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
daf34aa0
Commit
daf34aa0
authored
Mar 31, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added #send_image_custom test
parent
69f0abf1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
spec/api/custom_spec.rb
+12
-2
No files found.
spec/api/custom_spec.rb
View file @
daf34aa0
...
@@ -5,6 +5,14 @@ describe WeixinAuthorize::Api::Custom do
...
@@ -5,6 +5,14 @@ describe WeixinAuthorize::Api::Custom do
"text Custom message"
"text Custom message"
end
end
let
(
:image_path
)
do
"
#{
File
.
dirname
(
__FILE__
)
}
/medias/ruby-logo.jpg"
end
let
(
:image_file
)
do
File
.
new
(
image_path
)
end
it
"#send_text_custom"
do
it
"#send_text_custom"
do
response
=
$client
.
send_text_custom
(
ENV
[
"OPENID"
],
text_message
)
response
=
$client
.
send_text_custom
(
ENV
[
"OPENID"
],
text_message
)
expect
(
response
[
"errcode"
]).
to
eq
(
0
)
expect
(
response
[
"errcode"
]).
to
eq
(
0
)
...
@@ -28,8 +36,10 @@ describe WeixinAuthorize::Api::Custom do
...
@@ -28,8 +36,10 @@ describe WeixinAuthorize::Api::Custom do
end
end
it
"#send_image_custom"
do
it
"#send_image_custom"
do
pending
(
"The test must have a media_id"
)
image
=
$client
.
upload_media
(
image_file
,
"image"
)
this_should_not_get_executed
media_id
=
image
[
"media_id"
]
response
=
$client
.
send_image_custom
(
ENV
[
"OPENID"
],
media_id
)
expect
(
response
[
"errcode"
]).
to
eq
(
0
)
end
end
it
"#send_video_custom"
do
it
"#send_video_custom"
do
...
...
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