hide approval mod actions, better logic for user promotion/demotion mod actions

This commit is contained in:
albert
2013-02-28 10:19:31 -08:00
parent 29ae2561c8
commit 132ef8f93c
5 changed files with 25 additions and 4 deletions

View File

@@ -30,6 +30,13 @@ class UserTest < ActiveSupport::TestCase
@user.reload
assert_equal(User::Levels::MEMBER, @user.level)
end
should "create a mod action" do
assert_difference("ModAction.count") do
@user.invite!(User::Levels::CONTRIBUTOR)
end
assert_equal("level changed Member -> Contributor by #{CurrentUser.name}", ModAction.first.description)
end
end
context "who has negeative feedback and is trying to change their name" do