From 8b68ab6088a754dcacd77c7503b3c25b860edce2 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Tue, 8 Mar 2016 16:09:59 +0100 Subject: add test case for schema dumping of PG bytea columns. --- activerecord/test/cases/adapters/postgresql/bytea_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/activerecord/test/cases/adapters/postgresql/bytea_test.rb b/activerecord/test/cases/adapters/postgresql/bytea_test.rb index b6bb1929e6..7adc070430 100644 --- a/activerecord/test/cases/adapters/postgresql/bytea_test.rb +++ b/activerecord/test/cases/adapters/postgresql/bytea_test.rb @@ -1,6 +1,9 @@ require "cases/helper" +require 'support/schema_dumping_helper' class PostgresqlByteaTest < ActiveRecord::PostgreSQLTestCase + include SchemaDumpingHelper + class ByteaDataType < ActiveRecord::Base self.table_name = 'bytea_data_type' end @@ -122,4 +125,10 @@ class PostgresqlByteaTest < ActiveRecord::PostgreSQLTestCase obj.reload assert_equal "hello world", obj.serialized end + + def test_schema_dumping + output = dump_table_schema("bytea_data_type") + assert_match %r{t\.binary\s+"payload"$}, output + assert_match %r{t\.binary\s+"serialized"$}, output + end end -- cgit v1.2.3