aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-09-08 02:03:53 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-09-08 02:03:53 +0900
commit323350ec4be7c79cac8af39b72a38d0457b7ff71 (patch)
tree83403e4e40f89c7a3c5ee7e6ba6a8a5e23816c69 /activerecord/test
parenta4b73f822ec96422e032b7d72c853e3c825859a6 (diff)
downloadrails-323350ec4be7c79cac8af39b72a38d0457b7ff71.tar.gz
rails-323350ec4be7c79cac8af39b72a38d0457b7ff71.tar.bz2
rails-323350ec4be7c79cac8af39b72a38d0457b7ff71.zip
Add an extra assertion to ensure dumping schema default as expected
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/uuid_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb
index 8ba5132a8f..466d281e85 100644
--- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb
@@ -83,7 +83,10 @@ class PostgresqlUUIDTest < ActiveRecord::PostgreSQLTestCase
column = UUIDType.columns_hash["thingy"]
assert column.array?
- assert [], column.default
+ assert_equal "{}", column.default
+
+ schema = dump_table_schema "uuid_data_type"
+ assert_match %r{t\.uuid "thingy", default: \[\], array: true$}, schema
end
def test_data_type_of_uuid_types