Displaying 1 result from an estimated 1 matches for "test_invalid_with_empty_attribut".
Did you mean:
test_invalid_with_empty_attributes
2006 Nov 07
4
Unknown column 'id' in 'field list
...ays, :integer
t.column :less_than_ninety_days, :integer
t.column :all_days, :integer
end
end
def self.down
drop_table :active_user_metrics
end
end
The test I wrote is as follows.
class ActiveUserMetricTest < Test::Unit::TestCase
fixtures :active_user_metrics
def test_invalid_with_empty_attributes
metric = ActiveUserMetric.new
assert metric.invalid?
assert metric.errors.invalid?(:sample_date)
assert metric.errors.invalid?(:less_than_thirty_days)
assert metric.errors.invalid?(:less_than_ninety_days)
assert metric.errors.invalid?(:all_days)
end
end
When I run the t...