diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-06-13 08:23:32 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-13 08:23:32 +0000 |
commit | 504f3620330fa0cc8b6f3cb3f1647db2158a036f (patch) | |
tree | 870f125ae32037fe5b5f6b5da8f1ec4f7c6fb444 /spec/models | |
parent | 886b81e5c71529f1d61c4de4c16aab6171e1600e (diff) | |
parent | 9aad5ed0a23a6386bf48f166a6b07b3a41d9c2c1 (diff) | |
download | gitlab-ce-504f3620330fa0cc8b6f3cb3f1647db2158a036f.tar.gz |
Merge branch '42342-teams-pipeline-notifications' into 'master'
Resolve "Microsoft Teams notification for pipelines do not work"
Closes #42342
See merge request gitlab-org/gitlab-ce!19632
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_services/microsoft_teams_service_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/models/project_services/microsoft_teams_service_spec.rb b/spec/models/project_services/microsoft_teams_service_spec.rb index 8d9ee96227f..3351c6280b4 100644 --- a/spec/models/project_services/microsoft_teams_service_spec.rb +++ b/spec/models/project_services/microsoft_teams_service_spec.rb @@ -225,10 +225,15 @@ describe MicrosoftTeamsService do it 'calls Microsoft Teams API for pipeline events' do data = Gitlab::DataBuilder::Pipeline.build(pipeline) + data[:markdown] = true chat_service.execute(data) - expect(WebMock).to have_requested(:post, webhook_url).once + message = ChatMessage::PipelineMessage.new(data) + + expect(WebMock).to have_requested(:post, webhook_url) + .with(body: hash_including({ summary: message.summary })) + .once end end |