aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/calculations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/calculations_test.rb')
-rw-r--r--activerecord/test/calculations_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/calculations_test.rb b/activerecord/test/calculations_test.rb
index 23c45f8637..e450c0a917 100644
--- a/activerecord/test/calculations_test.rb
+++ b/activerecord/test/calculations_test.rb
@@ -131,6 +131,14 @@ class CalculationsTest < Test::Unit::TestCase
assert_equal 2, c[companies(:rails_core)]
assert_equal 1, c[companies(:first_client)]
end
+
+ def test_should_not_modify_options_when_using_includes
+ options = {:conditions => 'companies.id > 1', :include => :firm}
+ options_copy = options.dup
+
+ Account.count(:all, options)
+ assert_equal options_copy, options
+ end
def test_should_calculate_grouped_by_function
c = Company.count(:all, :group => "UPPER(#{QUOTED_TYPE})")