diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-03-15 05:50:17 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-03-15 05:50:17 -0700 |
commit | 962604f424d635bfc068f3e754a0e69471657b03 (patch) | |
tree | 2cd5bce4128c7d7f89fa4871b3a4662e7e375f2f /activerecord/test/cases | |
parent | cd6a9f896704935736d6742ab181854873138bd0 (diff) | |
parent | aae89ee8607a802557b4877feb995204e0b58fed (diff) | |
download | rails-962604f424d635bfc068f3e754a0e69471657b03.tar.gz rails-962604f424d635bfc068f3e754a0e69471657b03.tar.bz2 rails-962604f424d635bfc068f3e754a0e69471657b03.zip |
Merge pull request #9686 from strzalek/cast_number_to_string_in_pg
Cast number to string in Postgres
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/quoting_test.rb | 8 |
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 |