Use change-requiring records in admin/reports controller spec (#31052)

This commit is contained in:
Matt Jankowski 2024-07-18 03:49:44 -04:00 committed by GitHub
parent c5f8256801
commit 2616fde9e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,7 @@ describe Admin::ReportsController do
describe 'POST #reopen' do
it 'reopens the report' do
report = Fabricate(:report)
report = Fabricate(:report, action_taken_at: 3.days.ago)
put :reopen, params: { id: report }
expect(response).to redirect_to(admin_report_path(report))
@ -89,7 +89,7 @@ describe Admin::ReportsController do
describe 'POST #unassign' do
it 'reopens the report' do
report = Fabricate(:report)
report = Fabricate(:report, assigned_account_id: Account.last.id)
put :unassign, params: { id: report }
expect(response).to redirect_to(admin_report_path(report))