aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/duplication_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/duplication_test.rb')
-rw-r--r--activerecord/test/cases/duplication_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/duplication_test.rb b/activerecord/test/cases/duplication_test.rb
index f9d614230b..c6f7e3ef16 100644
--- a/activerecord/test/cases/duplication_test.rb
+++ b/activerecord/test/cases/duplication_test.rb
@@ -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