aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-11-17 14:56:38 -0500
committerGitHub <noreply@github.com>2016-11-17 14:56:38 -0500
commit4331ee8390908e52e56cf62b2759a152cddfe1b2 (patch)
tree8969fab99837eeb8a29660d3d4cfc785daef4d99 /activerecord/test/cases/adapters/postgresql
parent07af54d43cba30be7c206c5783ae15ab2cf37aa3 (diff)
parent70878b6e82fb33f769ab62d43c3dcf0267a3c618 (diff)
downloadrails-4331ee8390908e52e56cf62b2759a152cddfe1b2.tar.gz
rails-4331ee8390908e52e56cf62b2759a152cddfe1b2.tar.bz2
rails-4331ee8390908e52e56cf62b2759a152cddfe1b2.zip
Merge pull request #27076 from y-yagi/fix_postgresql_array_encoding
use `force_encoding` instread of `encode!` to avoid `UndefinedConversionError`
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql')
-rw-r--r--activerecord/test/cases/adapters/postgresql/array_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb
index d741ca4389..680dad9706 100644
--- a/activerecord/test/cases/adapters/postgresql/array_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/array_test.rb
@@ -312,9 +312,9 @@ class PostgresqlArrayTest < ActiveRecord::PostgreSQLTestCase
end
def test_encoding_arrays_of_utf8_strings
- string_with_utf8 = "nový"
- assert_equal [string_with_utf8], @type.deserialize(@type.serialize([string_with_utf8]))
- assert_equal [[string_with_utf8]], @type.deserialize(@type.serialize([[string_with_utf8]]))
+ arrays_of_utf8_strings = %w(nový ファイル)
+ assert_equal arrays_of_utf8_strings, @type.deserialize(@type.serialize(arrays_of_utf8_strings))
+ assert_equal [arrays_of_utf8_strings], @type.deserialize(@type.serialize([arrays_of_utf8_strings]))
end
private