diff options
Diffstat (limited to 'activerecord/test/cases/persistence_test.rb')
-rw-r--r-- | activerecord/test/cases/persistence_test.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb index 9209672ac5..823146b399 100644 --- a/activerecord/test/cases/persistence_test.rb +++ b/activerecord/test/cases/persistence_test.rb @@ -234,19 +234,12 @@ class PersistenceTest < ActiveRecord::TestCase end def test_save_with_duping_of_destroyed_object - developer = Developer.create(name: "Kuldeep") + developer = Developer.first developer.destroy new_developer = developer.dup new_developer.save assert new_developer.persisted? - end - - def test_dup_of_destroyed_object_is_not_destroyed - developer = Developer.create(name: "Kuldeep") - developer.destroy - new_developer = developer.dup - new_developer.save - assert_equal new_developer.destroyed?, false + assert_not new_developer.destroyed? end def test_create_many |