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/tooling/danger/sidekiq_args_spec.rb')
-rw-r--r--spec/tooling/danger/sidekiq_args_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/tooling/danger/sidekiq_args_spec.rb b/spec/tooling/danger/sidekiq_args_spec.rb
index bfa9ef169de..29bf32a9a02 100644
--- a/spec/tooling/danger/sidekiq_args_spec.rb
+++ b/spec/tooling/danger/sidekiq_args_spec.rb
@@ -71,6 +71,13 @@ RSpec.describe Tooling::Danger::SidekiqArgs, feature_category: :tooling do
specs.add_comment_for_matched_line(filename)
end
+
+ it 'adds a top level warning' do
+ allow(specs).to receive(:markdown)
+ expect(specs).to receive(:warn).with(described_class::MR_WARNING_COMMENT)
+
+ specs.add_comment_for_matched_line(filename)
+ end
end
context 'when args are not changed' do
@@ -84,6 +91,12 @@ RSpec.describe Tooling::Danger::SidekiqArgs, feature_category: :tooling do
specs.add_comment_for_matched_line(filename)
end
+
+ it 'does not add a top level warning' do
+ expect(specs).not_to receive(:warn)
+
+ specs.add_comment_for_matched_line(filename)
+ end
end
end