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:
authorDouwe Maan <douwe@gitlab.com>2018-06-13 11:23:32 +0300
committerDouwe Maan <douwe@gitlab.com>2018-06-13 11:23:32 +0300
commit504f3620330fa0cc8b6f3cb3f1647db2158a036f (patch)
tree870f125ae32037fe5b5f6b5da8f1ec4f7c6fb444 /spec/models/project_services
parent886b81e5c71529f1d61c4de4c16aab6171e1600e (diff)
parent9aad5ed0a23a6386bf48f166a6b07b3a41d9c2c1 (diff)
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/project_services')
-rw-r--r--spec/models/project_services/microsoft_teams_service_spec.rb7
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