FIX: Show suspended by user (#16927)

- Show "suspended by" user
- Add specs for silence user
This commit is contained in:
Johannes Faigle
2022-06-01 14:54:23 +02:00
committed by GitHub
parent cd0f912159
commit 7a223331d1
6 changed files with 124 additions and 2 deletions

View File

@ -162,6 +162,7 @@ RSpec.describe Admin::UsersController do
expect(user).to be_suspended
expect(user.suspended_at).to be_present
expect(user.suspended_till).to be_present
expect(user.suspend_record).to be_present
log = UserHistory.where(target_user_id: user.id).order('id desc').first
expect(log.details).to match(/because I said so/)
@ -896,6 +897,7 @@ RSpec.describe Admin::UsersController do
expect(response.status).to eq(200)
reg_user.reload
expect(reg_user).to be_silenced
expect(reg_user.silenced_record).to be_present
end
it "can have an associated post" do