Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dingtalk-sdk
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
dingtalk-sdk
Commits
4ac62e25
Commit
4ac62e25
authored
Oct 30, 2020
by
Francis Zhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix robot message builder rspec
parent
688eb432
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
robot_spec.rb
spec/dingtalk_sdk/robot_spec.rb
+11
-1
No files found.
spec/dingtalk_sdk/robot_spec.rb
View file @
4ac62e25
...
...
@@ -41,13 +41,23 @@ RSpec.describe DingtalkSdk::Robot do
expect
(
mesg_h
[
:at
]).
to
be_nil
end
it
'should compose message with at all'
do
builder
=
DingtalkSdk
::
Robot
::
MessageBuilder
.
new
builder
.
text
text:
'hello world'
builder
.
at_all
mesg_h
=
builder
.
to_h
expect
(
mesg_h
[
:at
][
:isAtAll
]).
to
be_truthy
expect
(
mesg_h
[
:at
][
:atMobiles
]).
to
be_nil
end
it
'should compose message with at mobiles'
do
builder
=
DingtalkSdk
::
Robot
::
MessageBuilder
.
new
builder
.
text
text:
'hello world'
builder
.
at_mobiles
[
123
,
456
]
mesg_h
=
builder
.
to_h
expect
(
mesg_h
[
:at
][
:isAtAll
]).
to
be_
nil
expect
(
mesg_h
[
:at
][
:isAtAll
]).
to
be_
falsey
expect
(
mesg_h
[
:at
][
:atMobiles
]).
to
eq
(
%w[123 456]
)
end
end
...
...
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