From 1ea16427613cd800c6781694f2bcd5d9b71d2480 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Mon, 15 Jun 2015 17:29:52 -0700 Subject: [PATCH] fix tests --- test/functional/janitor_trials_controller_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/functional/janitor_trials_controller_test.rb b/test/functional/janitor_trials_controller_test.rb index 8d90b9c15..b8d78349a 100644 --- a/test/functional/janitor_trials_controller_test.rb +++ b/test/functional/janitor_trials_controller_test.rb @@ -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