Fix sort order of moderation notes on Reports and Accounts (#31528)
This commit is contained in:
parent
a9d0b48b65
commit
c88ba523ee
12 changed files with 105 additions and 8 deletions
|
@ -47,6 +47,24 @@ RSpec.describe Admin::ReportsController do
|
|||
expect(response.body)
|
||||
.to include(report.comment)
|
||||
end
|
||||
|
||||
describe 'account moderation notes' do
|
||||
let(:report) { Fabricate(:report) }
|
||||
|
||||
it 'includes moderation notes' do
|
||||
note1 = Fabricate(:report_note, report: report)
|
||||
note2 = Fabricate(:report_note, report: report)
|
||||
|
||||
get :show, params: { id: report }
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
|
||||
report_notes = assigns(:report_notes).to_a
|
||||
|
||||
expect(report_notes.size).to be 2
|
||||
expect(report_notes).to eq [note1, note2]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #resolve' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue