diff options
author | Yves Senn <yves.senn@gmail.com> | 2016-03-08 16:09:59 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2016-03-08 16:09:59 +0100 |
commit | 8b68ab6088a754dcacd77c7503b3c25b860edce2 (patch) | |
tree | 0561d1c37770d0053968a73db45514fefd9de20e /activerecord/test | |
parent | 818a715dd3d305bf860263011d2313a3e041413c (diff) | |
download | rails-8b68ab6088a754dcacd77c7503b3c25b860edce2.tar.gz rails-8b68ab6088a754dcacd77c7503b3c25b860edce2.tar.bz2 rails-8b68ab6088a754dcacd77c7503b3c25b860edce2.zip |
add test case for schema dumping of PG bytea columns.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/bytea_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |