aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation_scoping_test.rb
diff options
context:
space:
mode:
authorDylan Smith <Dylan.Smith@shopify.com>2013-02-06 13:19:09 -0500
committerDylan Smith <Dylan.Smith@shopify.com>2013-02-07 05:02:38 -0500
commit04c2d2e2e4197a1564c33f09d3e52253d845925f (patch)
treec57b23a3197d773dcce73a322806f49833208dbf /activerecord/test/cases/relation_scoping_test.rb
parentb4f189a162f4280b360dbc2a6635bbff6c6f09bc (diff)
downloadrails-04c2d2e2e4197a1564c33f09d3e52253d845925f.tar.gz
rails-04c2d2e2e4197a1564c33f09d3e52253d845925f.tar.bz2
rails-04c2d2e2e4197a1564c33f09d3e52253d845925f.zip
active_record: Quote numeric values compared to string columns.
Diffstat (limited to 'activerecord/test/cases/relation_scoping_test.rb')
-rw-r--r--activerecord/test/cases/relation_scoping_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/relation_scoping_test.rb b/activerecord/test/cases/relation_scoping_test.rb
index f33e765c59..aec2487aee 100644
--- a/activerecord/test/cases/relation_scoping_test.rb
+++ b/activerecord/test/cases/relation_scoping_test.rb
@@ -380,19 +380,19 @@ class DefaultScopingTest < ActiveRecord::TestCase
def test_default_scope_with_inheritance
wheres = InheritedPoorDeveloperCalledJamis.scoped.where_values_hash
assert_equal "Jamis", wheres[:name]
- assert_equal 50000, wheres[:salary]
+ assert_equal Arel.sql("50000"), wheres[:salary]
end
def test_default_scope_with_module_includes
wheres = ModuleIncludedPoorDeveloperCalledJamis.scoped.where_values_hash
assert_equal "Jamis", wheres[:name]
- assert_equal 50000, wheres[:salary]
+ assert_equal Arel.sql("50000"), wheres[:salary]
end
def test_default_scope_with_multiple_calls
wheres = MultiplePoorDeveloperCalledJamis.scoped.where_values_hash
assert_equal "Jamis", wheres[:name]
- assert_equal 50000, wheres[:salary]
+ assert_equal Arel.sql("50000"), wheres[:salary]
end
def test_method_scope