Commit bf23553c authored by James Fargher's avatar James Fargher

Merge branch 'cablett-redundant-verdict-check' into 'master'

Remove redundant check

See merge request gitlab-org/gitlab!34926
parents 32578ca2 15001008
......@@ -50,10 +50,7 @@ module Spam
# @TODO metrics/logging
# Expecting:
# error: (string or nil)
# result: (string or nil)
verdict = json_result[:verdict]
return unless SUPPORTED_VERDICTS.include?(verdict)
# verdict: (string or nil)
# @TODO log if json_result[:error]
json_result[:verdict]
......
......@@ -192,8 +192,8 @@ describe Spam::SpamVerdictService do
context 'the verdict is an unexpected string' do
let(:verdict) { 'this is fine' }
it 'returns nil' do
expect(subject).to be_nil
it 'returns the string' do
expect(subject).to eq verdict
end
end
......@@ -209,7 +209,7 @@ describe Spam::SpamVerdictService do
let(:verdict) { '' }
it 'returns nil' do
expect(subject).to be_nil
expect(subject).to eq verdict
end
end
......
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