Created
October 5, 2010 21:05
-
-
Save leanucci/612336 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## line 657, test/cases/nested_attribute_test.rb | |
def test_should_trigger_validations_on_new_nested_objects | |
repair_validations(Bird) do | |
Bird.validates_uniqueness_of(:name) | |
assert_no_difference ['Pirate.count', 'Bird.count'] do | |
Pirate.create(:catchphrase => "Garrr!", :birds_attributes => {"0" => {:name => "Garrr!Bird"}, "1" => {:name => "Garrr!Bird"}}) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment