mirror of https://github.com/rails/rails
Merge pull request #4286 from kennyj/fix_4285
Fix GH #4285. Remove options when we record calling creat_table
This commit is contained in:
commit
4b81007acf
|
@ -59,7 +59,7 @@ module ActiveRecord
|
|||
private
|
||||
|
||||
def invert_create_table(args)
|
||||
[:drop_table, args]
|
||||
[:drop_table, [args.first]]
|
||||
end
|
||||
|
||||
def invert_rename_table(args)
|
||||
|
|
|
@ -67,6 +67,12 @@ module ActiveRecord
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue