diff options
author | Arthur Taylor <arthur@aupeo.com> | 2011-04-15 16:34:18 +0200 |
---|---|---|
committer | Arthur Taylor <arthur@aupeo.com> | 2011-04-15 16:34:18 +0200 |
commit | 660f706491ac012cb133554cffeaa6b9ae6046e9 (patch) | |
tree | ed6e6c9d4b1b2c58f5ea310397edfe7efd968fe3 /test | |
parent | fc353baa803ba5ab2c11d71adcec358ea5c75f44 (diff) | |
download | rails-660f706491ac012cb133554cffeaa6b9ae6046e9.tar.gz rails-660f706491ac012cb133554cffeaa6b9ae6046e9.tar.bz2 rails-660f706491ac012cb133554cffeaa6b9ae6046e9.zip |
Fixed deep copy bug in SelectManager clone
Diffstat (limited to 'test')
-rw-r--r-- | test/test_select_manager.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index 81a32e4490..955d8e8d3a 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -187,6 +187,16 @@ module Arel m2.project "foo" mgr.to_sql.wont_equal m2.to_sql end + + it 'makes updates to the correct copy' do + table = Table.new :users, :engine => Table.engine, :as => 'foo' + mgr = table.from table + m2 = mgr.clone + m3 = m2.clone + m2.project "foo" + mgr.to_sql.wont_equal m2.to_sql + m3.to_sql.must_equal mgr.to_sql + end end describe 'initialize' do |