fix tests

This commit is contained in:
r888888888
2015-06-15 17:29:52 -07:00
parent 68d3f77589
commit 1ea1642761

View File

@@ -34,11 +34,11 @@ class JanitorTrialsControllerTest < ActionController::TestCase
end
should "promote the janitor trial" do
assert_difference("JanitorTrial.count", -1) do
post :promote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
end
post :promote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
@user.reload
assert(@user.is_janitor?)
@janitor_trial.reload
assert_equal(false, @janitor_trial.active?)
end
end
@@ -48,11 +48,11 @@ class JanitorTrialsControllerTest < ActionController::TestCase
end
should "demote the janitor trial" do
assert_difference("JanitorTrial.count", -1) do
post :demote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
end
post :demote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
@user.reload
assert(!@user.is_janitor?)
@janitor_trial.reload
assert_equal(false, @janitor_trial.active?)
end
end