提交 4b81007a 编写于 作者: J José Valim

Merge pull request #4286 from kennyj/fix_4285

Fix GH #4285. Remove options when we record calling creat_table
......@@ -59,7 +59,7 @@ def #{method}(*args) # def create_table(*args)
private
def invert_create_table(args)
[:drop_table, args]
[:drop_table, [args.first]]
end
def invert_rename_table(args)
......
......@@ -67,6 +67,12 @@ def test_invert_create_table
assert_equal [:drop_table, [:system_settings]], drop_table
end
def test_invert_create_table_with_options
@recorder.record :create_table, [:people_reminders, {:id => false}]
drop_table = @recorder.inverse.first
assert_equal [:drop_table, [:people_reminders]], drop_table
end
def test_invert_rename_table
@recorder.record :rename_table, [:old, :new]
rename = @recorder.inverse.first
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册