Rename AdminLog to StaffActionLog

This commit is contained in:
Neil Lalonde
2013-07-23 17:58:26 -04:00
parent cc4ae05be3
commit a8df9778b5
12 changed files with 103 additions and 96 deletions

View File

@ -137,14 +137,14 @@ describe Admin::UsersController do
end
it "upgrades the user's trust level" do
AdminLogger.any_instance.expects(:log_trust_level_change).with(@another_user, 2).once
StaffActionLogger.any_instance.expects(:log_trust_level_change).with(@another_user, 2).once
xhr :put, :trust_level, user_id: @another_user.id, level: 2
@another_user.reload
@another_user.trust_level.should == 2
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]).never
StaffActionLogger.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