summaryrefslogtreecommitdiff
path: root/spec/models/concerns/spammable_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-19 03:07:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-19 03:07:38 +0000
commit0cee6f1577cd31cae7dc0e82f65dcad462a4d18a (patch)
tree180a48cc0b5b15e6f2ac489a6c828ebab591d4cf /spec/models/concerns/spammable_spec.rb
parentdcd01617a750c41fd082cc3383fc7ad2f2afd026 (diff)
downloadgitlab-ce-0cee6f1577cd31cae7dc0e82f65dcad462a4d18a.tar.gz
Add latest changes from gitlab-org/gitlab@master
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