Combine double subject in admin/statuses controller shared example (#28940)
parent
beb74fd71c
commit
685eaa04d4
|
@ -60,16 +60,14 @@ describe Admin::StatusesController do
|
||||||
shared_examples 'when action is report' do
|
shared_examples 'when action is report' do
|
||||||
let(:action) { 'report' }
|
let(:action) { 'report' }
|
||||||
|
|
||||||
it 'creates a report' do
|
it 'creates a report and redirects to report page' do
|
||||||
subject
|
subject
|
||||||
|
|
||||||
report = Report.last
|
expect(Report.last)
|
||||||
expect(report.target_account_id).to eq account.id
|
.to have_attributes(
|
||||||
expect(report.status_ids).to eq status_ids
|
target_account_id: eq(account.id),
|
||||||
end
|
status_ids: eq(status_ids)
|
||||||
|
)
|
||||||
it 'redirects to report page' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to redirect_to(admin_report_path(Report.last.id))
|
expect(response).to redirect_to(admin_report_path(Report.last.id))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue