diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-15 22:59:47 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-08-15 22:59:47 +0000 |
commit | 7fef2f7b75e284b702f327cc073476724b51d5ac (patch) | |
tree | 05929a1c38682ee0bb17856492ff424915f85029 /spec/controllers/admin | |
parent | 12918b0b9e99449181ce6f24c9bdb5d58ae6b89a (diff) | |
parent | 5994c11910822463faeabb7b5f11d6529036db9d (diff) | |
download | gitlab-ce-7fef2f7b75e284b702f327cc073476724b51d5ac.tar.gz |
Merge branch 'akismet-submittable' into 'master'
Submit to Akismet Part 1 (Issues)
Related to #5932 #5573 gitlab-com/infrastructure#14
See merge request !5538
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r-- | spec/controllers/admin/spam_logs_controller_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/admin/spam_logs_controller_spec.rb b/spec/controllers/admin/spam_logs_controller_spec.rb index 520a4f6f9c5..585ca31389d 100644 --- a/spec/controllers/admin/spam_logs_controller_spec.rb +++ b/spec/controllers/admin/spam_logs_controller_spec.rb @@ -34,4 +34,16 @@ describe Admin::SpamLogsController do expect { User.find(user.id) }.to raise_error(ActiveRecord::RecordNotFound) end end + + describe '#mark_as_ham' do + before do + allow_any_instance_of(AkismetService).to receive(:submit_ham).and_return(true) + end + it 'submits the log as ham' do + post :mark_as_ham, id: first_spam.id + + expect(response).to have_http_status(302) + expect(SpamLog.find(first_spam.id).submitted_as_ham).to be_truthy + end + end end |