Skip to content

Commit a67d58a

Browse files
committed
add (failing) big_serial schema dump test from Rails 4.2
1 parent 46d83d4 commit a67d58a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/db/postgresql/uuid_test.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,24 @@ def test_auto_create_uuid
5555
end
5656

5757
end if Test::Unit::TestCase.ar_version('4.0')
58+
59+
class PostgresqlLargeKeysTest < Test::Unit::TestCase # ActiveRecord::TestCase
60+
61+
def setup
62+
connection.create_table('big_serials', :id => :bigserial) do |t|
63+
t.string 'name'
64+
end
65+
end
66+
67+
def test_omg
68+
schema = StringIO.new
69+
ActiveRecord::SchemaDumper.dump(connection, schema)
70+
assert_match "create_table \"big_serials\", id: :bigserial, force: :cascade",
71+
schema.string
72+
end
73+
74+
def teardown
75+
connection.drop_table "big_serials"
76+
end
77+
78+
end if Test::Unit::TestCase.ar_version('4.2')

0 commit comments

Comments
 (0)