aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/quoting_test.rb
diff options
context:
space:
mode:
authorŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-03-12 16:05:01 +0100
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-03-12 16:13:01 +0100
commitaae89ee8607a802557b4877feb995204e0b58fed (patch)
treedad783f33dc8510d26c13328c5015c41b608af14 /activerecord/test/cases/adapters/postgresql/quoting_test.rb
parentd25a82280f977664e3b3d49c13bb68502718f6e2 (diff)
downloadrails-aae89ee8607a802557b4877feb995204e0b58fed.tar.gz
rails-aae89ee8607a802557b4877feb995204e0b58fed.tar.bz2
rails-aae89ee8607a802557b4877feb995204e0b58fed.zip
Cast number to string in Postgres
fixes #9170
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/quoting_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/quoting_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/quoting_test.rb b/activerecord/test/cases/adapters/postgresql/quoting_test.rb
index 685f0ea74f..b3429648ee 100644
--- a/activerecord/test/cases/adapters/postgresql/quoting_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/quoting_test.rb
@@ -44,6 +44,14 @@ module ActiveRecord
c = Column.new(nil, 1, 'float')
assert_equal "'Infinity'", @conn.quote(infinity, c)
end
+
+ def test_quote_cast_numeric
+ fixnum = 666
+ c = Column.new(nil, nil, 'string')
+ assert_equal "'666'", @conn.quote(fixnum, c)
+ c = Column.new(nil, nil, 'text')
+ assert_equal "'666'", @conn.quote(fixnum, c)
+ end
end
end
end