up.user = create(:user)
up.k = key * i
up.v = val * i
- assert up.valid?
+ assert_predicate up, :valid?
assert up.save!
resp = UserPreference.find(up.id)
assert_equal key * i, resp.k, "User preference with #{i} #{key} chars (i.e. #{key.length * i} bytes) fails"
up.user = create(:user)
up.k = key * i
up.v = val * i
- assert_not up.valid?
+ assert_not_predicate up, :valid?
assert_raise(ActiveRecord::RecordInvalid) { up.save! }
end
end