Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b38a3485
Commit
b38a3485
authored
Jul 18, 2018
by
Kukovskii Vladimir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Hangouts Chat service spec shared example
parent
d64196dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
spec/models/project_services/hangouts_chat_service_spec.rb
spec/models/project_services/hangouts_chat_service_spec.rb
+4
-8
No files found.
spec/models/project_services/hangouts_chat_service_spec.rb
View file @
b38a3485
...
...
@@ -45,7 +45,10 @@ describe HangoutsChatService do
it
'calls Hangouts Chat API'
do
subject
.
execute
(
sample_data
)
expect
(
WebMock
).
to
have_requested
(
:post
,
webhook_url
).
once
expect
(
WebMock
)
.
to
have_requested
(
:post
,
webhook_url
)
.
with
{
|
req
|
req
.
body
=~
/\A{"text":.+}\Z/
}
.
once
end
end
...
...
@@ -62,13 +65,6 @@ describe HangoutsChatService do
subject
.
execute
(
sample_data
)
end
it
'sends the simple text message to the Hangouts Chat API'
do
subject
.
execute
(
sample_data
)
expect
(
WebMock
).
to
have_requested
(
:post
,
webhook_url
).
once
.
with
{
|
req
|
req
.
body
=~
/\A{"text":.+}\Z/
}
end
context
'with not default branch'
do
let
(
:sample_data
)
do
Gitlab
::
DataBuilder
::
Push
.
build
(
project
,
user
,
nil
,
nil
,
'not-the-default-branch'
)
...
...
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