aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/hstore_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-12-02 11:32:54 +0100
committerYves Senn <yves.senn@gmail.com>2014-12-02 11:35:53 +0100
commitaf7c6e493c3d586b7b81f8176b4c99c1c791991b (patch)
tree240ee9766a8ff5f67b2d32981c51d88577dcbcf0 /activerecord/test/cases/adapters/postgresql/hstore_test.rb
parentbcf5b281a88dadd5c5001757b3d1958eb83606b5 (diff)
downloadrails-af7c6e493c3d586b7b81f8176b4c99c1c791991b.tar.gz
rails-af7c6e493c3d586b7b81f8176b4c99c1c791991b.tar.bz2
rails-af7c6e493c3d586b7b81f8176b4c99c1c791991b.zip
tests, move schema shorthand assertions into pg specific tests.
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/hstore_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/hstore_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb
index 6a9c6483fe..00ff456e16 100644
--- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb
@@ -1,8 +1,10 @@
# encoding: utf-8
require "cases/helper"
+require 'support/schema_dumping_helper'
if ActiveRecord::Base.connection.supports_extensions?
class PostgresqlHstoreTest < ActiveRecord::TestCase
+ include SchemaDumpingHelper
class Hstore < ActiveRecord::Base
self.table_name = 'hstores'
@@ -313,6 +315,11 @@ if ActiveRecord::Base.connection.supports_extensions?
assert_equal({"one" => "two"}, dupe.tags.to_hash)
end
+ def test_schema_dump_with_shorthand
+ output = dump_table_schema("hstores")
+ assert_match %r[t.hstore "tags",\s+default: {}], output
+ end
+
private
def assert_array_cycle(array)
# test creation