Commit dea4e5f0 authored by charlieablett's avatar charlieablett

Minor refactor of shared context

parent 3cf78b50
...@@ -49,7 +49,7 @@ describe Spam::SpamCheckService do ...@@ -49,7 +49,7 @@ describe Spam::SpamCheckService do
end end
end end
shared_examples 'akismet spam' do shared_examples 'only checks for spam if a request is provided' do
context 'when request is missing' do context 'when request is missing' do
let(:request) { nil } let(:request) { nil }
...@@ -132,7 +132,7 @@ describe Spam::SpamCheckService do ...@@ -132,7 +132,7 @@ describe Spam::SpamCheckService do
stub_feature_flags(allow_possible_spam: false) stub_feature_flags(allow_possible_spam: false)
end end
it_behaves_like 'akismet spam' it_behaves_like 'only checks for spam if a request is provided'
it 'marks as spam' do it 'marks as spam' do
subject subject
...@@ -142,7 +142,7 @@ describe Spam::SpamCheckService do ...@@ -142,7 +142,7 @@ describe Spam::SpamCheckService do
end end
context 'when allow_possible_spam feature flag is true' do context 'when allow_possible_spam feature flag is true' do
it_behaves_like 'akismet spam' it_behaves_like 'only checks for spam if a request is provided'
it 'does not mark as spam' do it 'does not mark as spam' do
subject subject
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment