Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKukovskii Vladimir <ura@dgtakano.co.jp>2018-07-18 14:14:55 +0300
committerKukovskii Vladimir <ura@dgtakano.co.jp>2018-07-18 14:14:55 +0300
commitb38a3485f0f6f08ce43bdf372a436ae5d73c329c (patch)
treeb34fbd89b2e8906437a24fdf43e39a70ad68a899 /spec/models
parentd64196ddb3336bd435c5756407cabc162f9acc6c (diff)
Fix Hangouts Chat service spec shared example
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_services/hangouts_chat_service_spec.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/models/project_services/hangouts_chat_service_spec.rb b/spec/models/project_services/hangouts_chat_service_spec.rb
index 8a1c4e33204..cfa55188a64 100644
--- a/spec/models/project_services/hangouts_chat_service_spec.rb
+++ b/spec/models/project_services/hangouts_chat_service_spec.rb
@@ -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')