aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/dup_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/dup_test.rb')
-rw-r--r--activerecord/test/cases/dup_test.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/test/cases/dup_test.rb b/activerecord/test/cases/dup_test.rb
index fa528c4936..768474e4ac 100644
--- a/activerecord/test/cases/dup_test.rb
+++ b/activerecord/test/cases/dup_test.rb
@@ -31,9 +31,12 @@ module ActiveRecord
end
def test_dup_with_changes
- topic = Topic.first
- topic.author_name = 'Aaron'
- duped = topic.dup
+ dbtopic = Topic.first
+ topic = Topic.new
+
+ topic.attributes = dbtopic.attributes
+
+ duped = dbtopic.dup
assert_equal topic.changes, duped.changes
end