mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: Reviewables should not be created for users until they are active
Conversely, if a user is deactivated the reviewable should automatically be rejected. Before this fix, if a user was not active they'd still show in the review queue but without an "Approve" button which was confusing.
This commit is contained in:
@ -71,6 +71,8 @@ RSpec.describe Admin::UsersController do
|
||||
end
|
||||
|
||||
it 'calls approve' do
|
||||
Jobs.run_immediately!
|
||||
evil_trout.activate
|
||||
put "/admin/users/#{evil_trout.id}/approve.json"
|
||||
expect(response.status).to eq(200)
|
||||
evil_trout.reload
|
||||
@ -102,6 +104,8 @@ RSpec.describe Admin::UsersController do
|
||||
end
|
||||
|
||||
it "approves the user when permitted" do
|
||||
Jobs.run_immediately!
|
||||
evil_trout.activate
|
||||
put "/admin/users/approve-bulk.json", params: { users: [evil_trout.id] }
|
||||
expect(response.status).to eq(200)
|
||||
evil_trout.reload
|
||||
|
Reference in New Issue
Block a user