diff options
author | Valery Sizov <valery@gitlab.com> | 2015-11-30 19:49:09 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-11-30 19:49:09 +0300 |
commit | e0131c5d07f22681e4118473dbfa0dd93df12b28 (patch) | |
tree | 7868f5342d9ef59b598d5a72d8615573e3cd9fb3 /spec/controllers | |
parent | a8e05cec000f3d2b17b966115c9d7b69629498db (diff) | |
parent | f1504e1ad52df7aec241b93d0d015da13ddce5a9 (diff) |
Merge branch 'rails_update_to_4_2' into 'master'
Rails update to 4.2.4
https://gitlab.com/gitlab-org/gitlab-ce/issues/2694
See merge request !1902
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/abuse_reports_controller_spec.rb | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/spec/controllers/abuse_reports_controller_spec.rb b/spec/controllers/abuse_reports_controller_spec.rb index 0faab8d7ff0..15824a1c67f 100644 --- a/spec/controllers/abuse_reports_controller_spec.rb +++ b/spec/controllers/abuse_reports_controller_spec.rb @@ -18,27 +18,31 @@ describe AbuseReportsController do end it "sends a notification email" do - post :create, - abuse_report: { - user_id: user.id, - message: message - } - - email = ActionMailer::Base.deliveries.last - - expect(email.to).to eq([admin_email]) - expect(email.subject).to include(user.username) - expect(email.text_part.body).to include(message) - end - - it "saves the abuse report" do - expect do + perform_enqueued_jobs do post :create, abuse_report: { user_id: user.id, message: message } - end.to change { AbuseReport.count }.by(1) + + email = ActionMailer::Base.deliveries.last + + expect(email.to).to eq([admin_email]) + expect(email.subject).to include(user.username) + expect(email.text_part.body).to include(message) + end + end + + it "saves the abuse report" do + perform_enqueued_jobs do + expect do + post :create, + abuse_report: { + user_id: user.id, + message: message + } + end.to change { AbuseReport.count }.by(1) + end end end |