aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/schema_dumper_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-05-16 16:29:43 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-05-16 16:29:43 -0700
commit835df6f3ed9b1575fd6a1fb62516d8ebeffbf114 (patch)
tree4d14825b67a32157efa18d4d8cbe27c342eb4df6 /activerecord/test/cases/schema_dumper_test.rb
parent66cbde016c5c457f25c45a71ef8839608ef77299 (diff)
parent0e1c6513a442737ab9ff757efec24a10cd2f947a (diff)
downloadrails-835df6f3ed9b1575fd6a1fb62516d8ebeffbf114.tar.gz
rails-835df6f3ed9b1575fd6a1fb62516d8ebeffbf114.tar.bz2
rails-835df6f3ed9b1575fd6a1fb62516d8ebeffbf114.zip
Merge pull request #6192 from danmcclain/add_inet_and_cidr_types_to_postgresql_adapter
Add support for macaddr, inet, and cidr types to PostgreSQL adapter
Diffstat (limited to 'activerecord/test/cases/schema_dumper_test.rb')
-rw-r--r--activerecord/test/cases/schema_dumper_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb
index 15ceaa1fcc..ab80dd1d6d 100644
--- a/activerecord/test/cases/schema_dumper_test.rb
+++ b/activerecord/test/cases/schema_dumper_test.rb
@@ -236,6 +236,27 @@ class SchemaDumperTest < ActiveRecord::TestCase
end
end
+ def test_schema_dump_includes_inet_shorthand_definition
+ output = standard_dump
+ if %r{create_table "postgresql_network_address"} =~ output
+ assert_match %r{t.inet "inet_address"}, output
+ end
+ end
+
+ def test_schema_dump_includes_cidr_shorthand_definition
+ output = standard_dump
+ if %r{create_table "postgresql_network_address"} =~ output
+ assert_match %r{t.cidr "cidr_address"}, output
+ end
+ end
+
+ def test_schema_dump_includes_macaddr_shorthand_definition
+ output = standard_dump
+ if %r{create_table "postgresql_network_address"} =~ output
+ assert_match %r{t.macaddr "macaddr_address"}, output
+ end
+ end
+
def test_schema_dump_includes_hstores_shorthand_definition
output = standard_dump
if %r{create_table "postgresql_hstores"} =~ output