diff options
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/array_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/array_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb index 1ba4daba37..e03d83df59 100644 --- a/activerecord/test/cases/adapters/postgresql/array_test.rb +++ b/activerecord/test/cases/adapters/postgresql/array_test.rb @@ -38,6 +38,9 @@ class PostgresqlArrayTest < ActiveRecord::TestCase def test_default @connection.add_column 'pg_arrays', 'score', :integer, array: true, default: [4, 4, 2] PgArray.reset_column_information + column = PgArray.columns_hash["score"] + + assert_equal([4, 4, 2], column.default) assert_equal([4, 4, 2], PgArray.new.score) ensure PgArray.reset_column_information @@ -48,6 +51,7 @@ class PostgresqlArrayTest < ActiveRecord::TestCase PgArray.reset_column_information column = PgArray.columns_hash["names"] + assert_equal(["foo", "bar"], column.default) assert_equal(["foo", "bar"], PgArray.new.names) ensure PgArray.reset_column_information |