fix tests
This commit is contained in:
@@ -34,11 +34,11 @@ class JanitorTrialsControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
should "promote the janitor trial" do
|
should "promote the janitor trial" do
|
||||||
assert_difference("JanitorTrial.count", -1) do
|
post :promote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
|
||||||
post :promote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
|
|
||||||
end
|
|
||||||
@user.reload
|
@user.reload
|
||||||
assert(@user.is_janitor?)
|
assert(@user.is_janitor?)
|
||||||
|
@janitor_trial.reload
|
||||||
|
assert_equal(false, @janitor_trial.active?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -48,11 +48,11 @@ class JanitorTrialsControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
should "demote the janitor trial" do
|
should "demote the janitor trial" do
|
||||||
assert_difference("JanitorTrial.count", -1) do
|
post :demote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
|
||||||
post :demote, {:id => @janitor_trial.id}, {:user_id => @admin.id}
|
|
||||||
end
|
|
||||||
@user.reload
|
@user.reload
|
||||||
assert(!@user.is_janitor?)
|
assert(!@user.is_janitor?)
|
||||||
|
@janitor_trial.reload
|
||||||
|
assert_equal(false, @janitor_trial.active?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user