1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #41238 from samjewell/sj/fix-has_one-create_associated-test-names

Update test names to match their behaviour
This commit is contained in:
Ryuta Kamizono 2021-01-26 17:15:29 +09:00 committed by GitHub
commit 668c1409f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -488,7 +488,7 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
assert_equal new_account.firm_name, "Account"
end
def test_creation_failure_without_dependent_option
def test_create_association_replaces_existing_without_dependent_option
pirate = pirates(:blackbeard)
orig_ship = pirate.ship
@ -501,7 +501,7 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
assert_not orig_ship.changed? # check it was saved
end
def test_creation_failure_with_dependent_option
def test_create_association_replaces_existing_with_dependent_option
pirate = pirates(:blackbeard).becomes(DestructivePirate)
orig_ship = pirate.dependent_ship