mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +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:
@ -290,6 +290,9 @@ describe WebHook do
|
||||
Fabricate(:user_web_hook, active: true)
|
||||
|
||||
user
|
||||
user.activate
|
||||
Jobs::CreateUserReviewable.new.execute(user_id: user.id)
|
||||
|
||||
job_args = Jobs::EmitWebHookEvent.jobs.last["args"].first
|
||||
|
||||
expect(job_args["event_name"]).to eq("user_created")
|
||||
|
Reference in New Issue
Block a user