fix tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user