mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:13:25 +08:00
If the change doesn't go through, don't log anything
This commit is contained in:
@ -144,7 +144,7 @@ describe Admin::UsersController do
|
||||
end
|
||||
|
||||
it "raises an error when demoting a user below their current trust level" do
|
||||
AdminLogger.any_instance.expects(:log_trust_level_change).with(@another_user, TrustLevel.levels[:newuser]).once
|
||||
AdminLogger.any_instance.expects(:log_trust_level_change).with(@another_user, TrustLevel.levels[:newuser]).never
|
||||
@another_user.topics_entered = SiteSetting.basic_requires_topics_entered + 1
|
||||
@another_user.posts_read_count = SiteSetting.basic_requires_read_posts + 1
|
||||
@another_user.time_read = SiteSetting.basic_requires_time_spent_mins * 60
|
||||
|
Reference in New Issue
Block a user