提交 c15c1456 编写于 作者: A Aaron Patterson

removing duplicate test

上级 85a5318c
......@@ -445,43 +445,6 @@ def test_create_table_without_a_block
Person.connection.drop_table table_name rescue nil
end
def test_create_table_with_custom_sequence_name
return unless current_adapter? :OracleAdapter
# table name is 29 chars, the standard sequence name will
# be 33 chars and fail
assert_raise(ActiveRecord::StatementInvalid) do
begin
Person.connection.create_table :table_with_name_thats_just_ok do |t|
t.column :foo, :string, :null => false
end
ensure
Person.connection.drop_table :table_with_name_thats_just_ok rescue nil
end
end
# should be all good w/ a custom sequence name
assert_nothing_raised do
begin
Person.connection.create_table :table_with_name_thats_just_ok,
:sequence_name => 'suitably_short_seq' do |t|
t.column :foo, :string, :null => false
end
Person.connection.execute("select suitably_short_seq.nextval from dual")
ensure
Person.connection.drop_table :table_with_name_thats_just_ok,
:sequence_name => 'suitably_short_seq' rescue nil
end
end
# confirm the custom sequence got dropped
assert_raise(ActiveRecord::StatementInvalid) do
Person.connection.execute("select suitably_short_seq.nextval from dual")
end
end
# Sybase, and SQLite3 will not allow you to add a NOT NULL
# column to a table without a default value.
unless current_adapter?(:SybaseAdapter, :SQLite3Adapter)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册