diff options
Diffstat (limited to 'spec/controllers/admin/reports_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin/reports_controller_spec.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/controllers/admin/reports_controller_spec.rb b/spec/controllers/admin/reports_controller_spec.rb index 4cd1524bf..97daaf8da 100644 --- a/spec/controllers/admin/reports_controller_spec.rb +++ b/spec/controllers/admin/reports_controller_spec.rb @@ -1,9 +1,12 @@ +# frozen_string_literal: true + require 'rails_helper' describe Admin::ReportsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } + before do sign_in user, scope: :user end @@ -54,7 +57,7 @@ describe Admin::ReportsController do expect(response).to redirect_to(admin_reports_path) report.reload expect(report.action_taken_by_account).to eq user.account - expect(report.action_taken?).to eq true + expect(report.action_taken?).to be true end end @@ -65,8 +68,8 @@ describe Admin::ReportsController do put :reopen, params: { id: report } expect(response).to redirect_to(admin_report_path(report)) report.reload - expect(report.action_taken_by_account).to eq nil - expect(report.action_taken?).to eq false + expect(report.action_taken_by_account).to be_nil + expect(report.action_taken?).to be false end end @@ -88,7 +91,7 @@ describe Admin::ReportsController do put :unassign, params: { id: report } expect(response).to redirect_to(admin_report_path(report)) report.reload - expect(report.assigned_account).to eq nil + expect(report.assigned_account).to be_nil end end end |