Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weixin_authorize
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
weixin_authorize
Commits
3138fac7
Commit
3138fac7
authored
May 05, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26 from lang1pal/master
发现个小错误
parents
eab03329
70602fae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
lib/weixin_authorize.rb
+2
-2
spec/api/groups_spec.rb
+1
-1
spec/api/qrcode_spec.rb
+7
-1
spec/spec_helper.rb
+3
-3
No files found.
lib/weixin_authorize.rb
View file @
3138fac7
...
@@ -54,8 +54,8 @@ module WeixinAuthorize
...
@@ -54,8 +54,8 @@ module WeixinAuthorize
"http://file.api.weixin.qq.com/cgi-bin"
"http://file.api.weixin.qq.com/cgi-bin"
end
end
def
mp_endpoint
def
mp_endpoint
(
url
)
"https://mp.weixin.qq.com/cgi-bin"
"https://mp.weixin.qq.com/cgi-bin
#{
url
}
"
end
end
end
end
...
...
spec/api/groups_spec.rb
View file @
3138fac7
...
@@ -12,7 +12,7 @@ describe WeixinAuthorize::Api::Groups do
...
@@ -12,7 +12,7 @@ describe WeixinAuthorize::Api::Groups do
it
"create a group"
do
it
"create a group"
do
response
=
$client
.
create_group
(
group_name
)
response
=
$client
.
create_group
(
group_name
)
if
response
.
code
==
WeixinAuthorize
::
OK_CODE
if
response
.
code
==
WeixinAuthorize
::
OK_CODE
expect
(
response
[
"group"
][
"name"
]).
to
eq
(
group_name
)
expect
(
response
.
result
[
"group"
][
"name"
]).
to
eq
(
group_name
)
else
else
expect
(
response
.
code
).
to
eq
(
-
1
)
expect
(
response
.
code
).
to
eq
(
-
1
)
puts
"SB WEIXIN says: system error"
puts
"SB WEIXIN says: system error"
...
...
spec/api/qrcode_spec.rb
View file @
3138fac7
...
@@ -14,5 +14,11 @@ describe WeixinAuthorize::Api::Qrcode do
...
@@ -14,5 +14,11 @@ describe WeixinAuthorize::Api::Qrcode do
expect
(
response
.
code
).
to
eq
(
WeixinAuthorize
::
OK_CODE
)
expect
(
response
.
code
).
to
eq
(
WeixinAuthorize
::
OK_CODE
)
expect
(
response
.
result
.
keys
).
to
eq
([
"ticket"
])
expect
(
response
.
result
.
keys
).
to
eq
([
"ticket"
])
end
end
it
"#return_qr_url"
do
response
=
$client
.
create_qr_limit_scene
(
"1234"
)
qr_url
=
$client
.
qr_code_url
(
response
.
result
[
"ticket"
])
expect
(
response
.
code
).
to
eq
(
WeixinAuthorize
::
OK_CODE
)
expect
(
qr_url
).
to
match
(
/(\S+\.(com|net|org|edu|gov)(\/\S+)?)/
)
end
end
end
spec/spec_helper.rb
View file @
3138fac7
...
@@ -37,9 +37,9 @@ SimpleCov.start
...
@@ -37,9 +37,9 @@ SimpleCov.start
ENV
[
'CODECLIMATE_REPO_TOKEN'
]
=
"c91fecbbd9e414e7cc3ad7a7d99207145de0ac65a3368de09e8c19295343d399"
ENV
[
'CODECLIMATE_REPO_TOKEN'
]
=
"c91fecbbd9e414e7cc3ad7a7d99207145de0ac65a3368de09e8c19295343d399"
CodeClimate
::
TestReporter
.
start
CodeClimate
::
TestReporter
.
start
ENV
[
"APPID"
]
=
"wx
986f04063d341d04
"
ENV
[
"APPID"
]
=
"wx
e371e0960de5426a
"
ENV
[
"APPSECRET"
]
=
"
1a941cd88cb4579ba98ec06b6813af03
"
ENV
[
"APPSECRET"
]
=
"
572b93d3d20aea242692a804243a141b
"
ENV
[
"OPENID"
]
=
"o
9k6BuB0kydAcPTc7sPxppB1GQqA
"
ENV
[
"OPENID"
]
=
"o
EEoyuEasxionjR5HygmEOQGwRcw
"
# Comment to test for ClientStorage
# Comment to test for ClientStorage
redis
=
Redis
.
new
(
:host
=>
"127.0.0.1"
,
:port
=>
"6379"
)
redis
=
Redis
.
new
(
:host
=>
"127.0.0.1"
,
:port
=>
"6379"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment