0
0
Fork 0

Fix sort order of moderation notes on Reports and Accounts (#31528)

This commit is contained in:
Emelia Smith 2024-09-06 16:58:36 +02:00 committed by GitHub
parent a9d0b48b65
commit c88ba523ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 105 additions and 8 deletions

View file

@ -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