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/models/concerns/spammable_spec.rb')
-rw-r--r--spec/models/concerns/spammable_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/concerns/spammable_spec.rb b/spec/models/concerns/spammable_spec.rb
index baa2d75705a..44cf87aa1c1 100644
--- a/spec/models/concerns/spammable_spec.rb
+++ b/spec/models/concerns/spammable_spec.rb
@@ -202,5 +202,21 @@ RSpec.describe Spammable do
expect(issue.submittable_as_spam_by?(nil)).to be_nil
end
end
+
+ describe '#allow_possible_spam?' do
+ subject { issue.allow_possible_spam? }
+
+ context 'when the `allow_possible_spam` application setting is turned off' do
+ it { is_expected.to eq(false) }
+ end
+
+ context 'when the `allow_possible_spam` application setting is turned on' do
+ before do
+ stub_application_setting(allow_possible_spam: true)
+ end
+
+ it { is_expected.to eq(true) }
+ end
+ end
end
end