mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Don't override count value that has been set by query.count
This commit is contained in:
@@ -38,6 +38,13 @@ describe Jobs::PendingUsersReminder do
|
||||
PostCreator.expects(:create).never
|
||||
Jobs::PendingUsersReminder.new.execute({})
|
||||
end
|
||||
|
||||
it "sets the correct pending user count in the notification" do
|
||||
SiteSetting.pending_users_reminder_delay = 8
|
||||
Fabricate(:user, created_at: 9.hours.ago)
|
||||
PostCreator.expects(:create).with(Discourse.system_user, has_entries(title: '1 user waiting for approval'))
|
||||
Jobs::PendingUsersReminder.new.execute({})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user