diff options
author | Valery Sizov <valery@gitlab.com> | 2014-10-21 11:19:52 +0000 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2014-10-21 11:19:52 +0000 |
commit | fbe9b00fc9304f3e4a98192be99a7dce17ae08a0 (patch) | |
tree | 05e7bd4e16a72357cb7a2b259f06786b42f08442 /spec | |
parent | b78cd70d33954d8bb69f736cda52e23cd3b2da0e (diff) | |
parent | ce61de68ba43bd59dcec607dddae49591459bf93 (diff) | |
download | gitlab-ce-fbe9b00fc9304f3e4a98192be99a7dce17ae08a0.tar.gz |
Merge branch 'slack_team_name' into 'master'
Slack team name
Fixes a problem in slack team name with hyphens.
https://gitlab.com/gitlab-org/gitlab-ce/issues/701
See merge request !1204
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/slack_service_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/slack_service_spec.rb b/spec/models/slack_service_spec.rb index 95df38d9400..526165e397c 100644 --- a/spec/models/slack_service_spec.rb +++ b/spec/models/slack_service_spec.rb @@ -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 |