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
cccfede3
Commit
cccfede3
authored
Oct 21, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for allowed team name of slack.
parent
ee068e76
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
spec/models/slack_service_spec.rb
spec/models/slack_service_spec.rb
+20
-0
No files found.
spec/models/slack_service_spec.rb
View file @
cccfede3
...
...
@@ -77,5 +77,25 @@ describe SlackService do
WebMock
.
should
have_requested
(
:post
,
api_url
).
once
end
end
context
'with new webhook syntax with slack allowed team name'
do
before
do
@allowed_webhook
=
'https://gitlab-hq-123.slack.com/services/hooks/incoming-webhook?token=cdIj4r4LfXUOySDUjp0tk3OI'
slack_service
.
stub
(
project:
project
,
project_id:
project
.
id
,
service_hook:
true
,
webhook:
@allowed_webhook
)
WebMock
.
stub_request
(
:post
,
@allowed_webhook
)
end
it
"should call Slack API"
do
slack_service
.
execute
(
sample_data
)
WebMock
.
should
have_requested
(
:post
,
@allowed_webhook
).
once
end
end
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