|
|
|
@ -27,7 +27,7 @@ describe Admin::ReportNotesController do
|
|
|
|
|
it 'creates a report note and resolves report' do
|
|
|
|
|
expect { subject }.to change(ReportNote, :count).by(1)
|
|
|
|
|
expect(report.reload).to be_action_taken
|
|
|
|
|
expect(subject).to redirect_to admin_reports_path
|
|
|
|
|
expect(response).to redirect_to admin_reports_path
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -37,7 +37,7 @@ describe Admin::ReportNotesController do
|
|
|
|
|
it 'creates a report note and does not resolve report' do
|
|
|
|
|
expect { subject }.to change(ReportNote, :count).by(1)
|
|
|
|
|
expect(report.reload).to_not be_action_taken
|
|
|
|
|
expect(subject).to redirect_to admin_report_path(report)
|
|
|
|
|
expect(response).to redirect_to admin_report_path(report)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@ -52,7 +52,7 @@ describe Admin::ReportNotesController do
|
|
|
|
|
it 'creates a report note and unresolves report' do
|
|
|
|
|
expect { subject }.to change(ReportNote, :count).by(1)
|
|
|
|
|
expect(report.reload).to_not be_action_taken
|
|
|
|
|
expect(subject).to redirect_to admin_report_path(report)
|
|
|
|
|
expect(response).to redirect_to admin_report_path(report)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -62,7 +62,7 @@ describe Admin::ReportNotesController do
|
|
|
|
|
it 'creates a report note and does not unresolve report' do
|
|
|
|
|
expect { subject }.to change(ReportNote, :count).by(1)
|
|
|
|
|
expect(report.reload).to be_action_taken
|
|
|
|
|
expect(subject).to redirect_to admin_report_path(report)
|
|
|
|
|
expect(response).to redirect_to admin_report_path(report)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@ -86,7 +86,7 @@ describe Admin::ReportNotesController do
|
|
|
|
|
|
|
|
|
|
it 'deletes note' do
|
|
|
|
|
expect { subject }.to change(ReportNote, :count).by(-1)
|
|
|
|
|
expect(subject).to redirect_to admin_report_path(report_note.report)
|
|
|
|
|
expect(response).to redirect_to admin_report_path(report_note.report)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|