diff options
Diffstat (limited to 'activerecord/test/validations_test.rb')
-rwxr-xr-x | activerecord/test/validations_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb index c396d30630..8e25453fae 100755 --- a/activerecord/test/validations_test.rb +++ b/activerecord/test/validations_test.rb @@ -138,10 +138,25 @@ class ValidationsTest < Test::Unit::TestCase t = Topic.create("title" => "We should be confirmed") assert !t.save + assert_equal "must be accepted", t.errors.on(:terms_of_service) t.terms_of_service = "1" assert t.save Topic.write_inheritable_attribute("validate_on_create", []) end + + + def test_eula + Topic.validate_acceptance(:eula, "must be abided") + + t = Topic.create("title" => "We should be confirmed") + assert !t.save + assert_equal "must be abided", t.errors.on(:eula) + + t.eula = "1" + assert t.save + + Topic.write_inheritable_attribute("validate_on_create", []) + end end
\ No newline at end of file |