diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-18 16:00:47 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-18 16:00:47 -0300 |
commit | 1879c259b870938c42d5d52f63123bfa0b8c81c8 (patch) | |
tree | fb11dc4b5ca6bb20092631afa02c9cb392ddb80c /activerecord/test | |
parent | 4f23760a07186ff9c0c5935c971d2978f9f57277 (diff) | |
parent | 8b20c72dd80e2faf531f308d430a145a253aeac3 (diff) | |
download | rails-1879c259b870938c42d5d52f63123bfa0b8c81c8.tar.gz rails-1879c259b870938c42d5d52f63123bfa0b8c81c8.tar.bz2 rails-1879c259b870938c42d5d52f63123bfa0b8c81c8.zip |
Merge branch '4-1-0-beta2'
Conflicts:
actionview/CHANGELOG.md
activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/datatype_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/datatype_test.rb b/activerecord/test/cases/adapters/postgresql/datatype_test.rb index 04a458fbce..5c3a797c41 100644 --- a/activerecord/test/cases/adapters/postgresql/datatype_test.rb +++ b/activerecord/test/cases/adapters/postgresql/datatype_test.rb @@ -78,6 +78,14 @@ class PostgresqlDataTypeTest < ActiveRecord::TestCase PostgresqlBitString, PostgresqlOid, PostgresqlTimestampWithZone, PostgresqlUUID].each(&:delete_all) end + def test_array_escaping + unknown = %(foo\\",bar,baz,\\) + nicknames = ["hello_#{unknown}"] + ar = PostgresqlArray.create!(nicknames: nicknames, id: 100) + ar.reload + assert_equal nicknames, ar.nicknames + end + def test_data_type_of_array_types assert_equal :integer, @first_array.column_for_attribute(:commission_by_quarter).type assert_equal :text, @first_array.column_for_attribute(:nicknames).type |