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
|
@ -55,6 +55,23 @@ RSpec.describe Admin::AccountsController do
|
|||
describe 'GET #show' do
|
||||
let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
|
||||
|
||||
describe 'account moderation notes' do
|
||||
let(:account) { Fabricate(:account) }
|
||||
|
||||
it 'includes moderation notes' do
|
||||
note1 = Fabricate(:account_moderation_note, target_account: account)
|
||||
note2 = Fabricate(:account_moderation_note, target_account: account)
|
||||
|
||||
get :show, params: { id: account.id }
|
||||
expect(response).to have_http_status(200)
|
||||
|
||||
moderation_notes = assigns(:moderation_notes).to_a
|
||||
|
||||
expect(moderation_notes.size).to be 2
|
||||
expect(moderation_notes).to eq [note1, note2]
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a remote account' do
|
||||
let(:account) { Fabricate(:account, domain: 'example.com') }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue