This commit is contained in:
r888888888
2015-06-25 13:51:05 -07:00
parent 3cc7dbbedc
commit 1d9596d7f2
64 changed files with 244 additions and 140 deletions

View File

@@ -22,10 +22,10 @@ class JanitorTrialTest < ActiveSupport::TestCase
end
end
should "toggle the janitor flag on the user" do
should "toggle the can_approve_posts flag on the user" do
janitor_trial = JanitorTrial.create(:user_id => @user.id)
@user.reload
assert(@user.is_janitor?)
assert(@user.can_approve_posts?)
end
end
@@ -39,6 +39,12 @@ class JanitorTrialTest < ActiveSupport::TestCase
@janitor_trial.demote!
end
end
should "revoke approval privileges" do
@janitor_trial.demote!
@user.reload
assert_equal(false, @user.can_approve_posts?)
end
end
context "upon promotion" do