BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
536f61e0
Commit
536f61e0
authored
Oct 21, 2014
by
Marin Jankovski
Committed by
Valery Sizov
Oct 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for allowed team name of slack.
parent
9f54397f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
slack_service_spec.rb
spec/models/slack_service_spec.rb
+20
-0
No files found.
spec/models/slack_service_spec.rb
View file @
536f61e0
...
...
@@ -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