aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2013-06-03 20:09:33 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2013-06-03 20:09:33 +0200
commit59caeb6c606cb78b92a24def2bea515c85b2421e (patch)
tree8399fd996a643f8606233534690fea0b1f8e55f2 /activerecord/test/cases
parentf9c2f76bea41c4a7ad1419844c6102211787c458 (diff)
parent75135a97907b4bdeb51eefaaaf8bd35215206fa7 (diff)
downloadrails-59caeb6c606cb78b92a24def2bea515c85b2421e.tar.gz
rails-59caeb6c606cb78b92a24def2bea515c85b2421e.tar.bz2
rails-59caeb6c606cb78b92a24def2bea515c85b2421e.zip
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/validations/association_validation_test.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/activerecord/test/cases/validations/association_validation_test.rb b/activerecord/test/cases/validations/association_validation_test.rb
index 7ac34bc71e..7e92a2b127 100644
--- a/activerecord/test/cases/validations/association_validation_test.rb
+++ b/activerecord/test/cases/validations/association_validation_test.rb
@@ -118,21 +118,4 @@ class AssociationValidationTest < ActiveRecord::TestCase
end
end
- def test_validates_associated_models_in_the_same_context
- Topic.validates_presence_of :title, :on => :custom_context
- Topic.validates_associated :replies
- Reply.validates_presence_of :title, :on => :custom_context
-
- t = Topic.new('title' => '')
- r = t.replies.new('title' => '')
-
- assert t.valid?
- assert !t.valid?(:custom_context)
-
- t.title = "Longer"
- assert !t.valid?(:custom_context), "Should NOT be valid if the associated object is not valid in the same context."
-
- r.title = "Longer"
- assert t.valid?(:custom_context), "Should be valid if the associated object is not valid in the same context."
- end
end