Commit b38a3485 authored by Kukovskii Vladimir's avatar Kukovskii Vladimir

Fix Hangouts Chat service spec shared example

parent d64196dd
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment