diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 13:38:20 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 14:29:05 -0800 |
commit | d717cb29136b8e4f557e6f6ddf076ae3de8476fc (patch) | |
tree | ee01ffe72cc12cf64d9dcff7b15e9c8e237b828b /activerecord/test | |
parent | fe4388eb15d44612710f2fc2f81c90a890278b23 (diff) | |
download | rails-d717cb29136b8e4f557e6f6ddf076ae3de8476fc.tar.gz rails-d717cb29136b8e4f557e6f6ddf076ae3de8476fc.tar.bz2 rails-d717cb29136b8e4f557e6f6ddf076ae3de8476fc.zip |
clone and dup are working on 1.8
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/dup_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/test/cases/dup_test.rb b/activerecord/test/cases/dup_test.rb index 768474e4ac..a1fc639290 100644 --- a/activerecord/test/cases/dup_test.rb +++ b/activerecord/test/cases/dup_test.rb @@ -9,6 +9,21 @@ module ActiveRecord assert !Topic.new.freeze.dup.frozen? end + def test_not_readonly + topic = Topic.first + + duped = topic.dup + assert !topic.readonly?, 'should not be readonly' + end + + def test_is_readonly + topic = Topic.first + topic.readonly! + + duped = topic.dup + assert topic.readonly?, 'should be readonly' + end + def test_dup_not_persisted topic = Topic.first duped = topic.dup |