making sure changes to dup will not touch original

This commit is contained in:
Aaron Patterson
2010-11-23 10:59:23 -08:00
parent 5badf60d12
commit 035d00b665

View File

@@ -54,5 +54,15 @@ module ActiveRecord
duped = topic.dup
assert_equal topic.changes, duped.changes
end
def test_dup_topics_are_independent
topic = Topic.first
topic.author_name = 'Aaron'
duped = topic.dup
duped.author_name = 'meow'
assert_not_equal topic.changes, duped.changes
end
end
end