提交 035d00b6 编写于 作者: A Aaron Patterson

making sure changes to dup will not touch original

上级 5badf60d
......@@ -54,5 +54,15 @@ def test_dup_with_changes
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册