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:
Diffstat (limited to 'spec/support/shared_examples/models/chat_integration_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/models/chat_integration_shared_examples.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/support/shared_examples/models/chat_integration_shared_examples.rb b/spec/support/shared_examples/models/chat_integration_shared_examples.rb
index 72659dd5f3b..e6b270c6188 100644
--- a/spec/support/shared_examples/models/chat_integration_shared_examples.rb
+++ b/spec/support/shared_examples/models/chat_integration_shared_examples.rb
@@ -71,7 +71,7 @@ RSpec.shared_examples "chat integration" do |integration_name|
it "does not call #{integration_name} API" do
result = subject.execute(sample_data)
- expect(result).to be(false)
+ expect(result).to be_falsy
expect(WebMock).not_to have_requested(:post, webhook_url)
end
end
@@ -113,7 +113,7 @@ RSpec.shared_examples "chat integration" do |integration_name|
context "with protected branch" do
before do
- create(:protected_branch, project: project, name: "a-protected-branch")
+ create(:protected_branch, :create_branch_on_repository, project: project, name: "a-protected-branch")
end
let(:sample_data) do
@@ -309,7 +309,7 @@ RSpec.shared_examples "chat integration" do |integration_name|
context "with protected branch" do
before do
- create(:protected_branch, project: project, name: "a-protected-branch")
+ create(:protected_branch, :create_branch_on_repository, project: project, name: "a-protected-branch")
end
let(:sample_data) do
@@ -355,5 +355,11 @@ RSpec.shared_examples "chat integration" do |integration_name|
end
end
end
+
+ context 'deployment events' do
+ let(:sample_data) { Gitlab::DataBuilder::Deployment.build(create(:deployment), Time.now) }
+
+ it_behaves_like "untriggered #{integration_name} integration"
+ end
end
end