fix tests

This commit is contained in:
r888888888
2015-06-12 18:33:16 -07:00
parent 5dbbc12fe1
commit e01eef5366
2 changed files with 10 additions and 3 deletions

View File

@@ -91,4 +91,12 @@ class JanitorTrial < ActiveRecord::Base
user.update_column(:level, original_level)
self.create_feedback
end
def active?
status == "active"
end
def inactive?
status == "inactive"
end
end

View File

@@ -47,9 +47,8 @@ class JanitorTrialTest < ActiveSupport::TestCase
end
should "destroy the trial object" do
assert_difference("JanitorTrial.count", -1) do
@janitor_trial.promote!
end
@janitor_trial.promote!
assert_equal(false, @janitor_trial.active?)
end
end
end