diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-01 09:45:46 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-01 09:45:46 -0800 |
commit | 989923e5a413d7527a7f1cdf5f18da7ff36ea4cc (patch) | |
tree | 57aa1a905af6780f1928b858fbe0e42615c8485c /activerecord/test/cases/adapters/postgresql | |
parent | 82701cd61e2e4ba0fd70be0c7547d1d783ef2d51 (diff) | |
parent | a34c10f73e739142794a2e6366328051fcc91238 (diff) | |
download | rails-989923e5a413d7527a7f1cdf5f18da7ff36ea4cc.tar.gz rails-989923e5a413d7527a7f1cdf5f18da7ff36ea4cc.tar.bz2 rails-989923e5a413d7527a7f1cdf5f18da7ff36ea4cc.zip |
Merge pull request #13912 from mauricio/bug-13907
Fixes issue with parsing whitespace content back from database - fixes #13907
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/array_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb index d71e2aa2bb..3090f4478f 100644 --- a/activerecord/test/cases/adapters/postgresql/array_test.rb +++ b/activerecord/test/cases/adapters/postgresql/array_test.rb @@ -93,6 +93,18 @@ class PostgresqlArrayTest < ActiveRecord::TestCase assert_cycle(:tags, [[['1'], ['2']], [['2'], ['3']]]) end + def test_with_empty_strings + assert_cycle(:tags, [ '1', '2', '', '4', '', '5' ]) + end + + def test_with_multi_dimensional_empty_strings + assert_cycle(:tags, [[['1', '2'], ['', '4'], ['', '5']]]) + end + + def test_with_arbitrary_whitespace + assert_cycle(:tags, [[['1', '2'], [' ', '4'], [' ', '5']]]) + end + def test_multi_dimensional_with_integers assert_cycle(:ratings, [[[1], [7]], [[8], [10]]]) end |