diff options
author | noam <CLUSTERfoo@users.noreply.github.com> | 2014-11-17 12:54:40 -0500 |
---|---|---|
committer | noam <CLUSTERfoo@users.noreply.github.com> | 2014-12-03 11:35:40 -0500 |
commit | b64fb3020b34a8b9607802613d13e81b362dbae2 (patch) | |
tree | 3ebc4bceb70327405d55b7a2dd2306a5290115d2 /activerecord/test/cases/migration | |
parent | 497544f0b3eba83c1385579de50a3d521188e448 (diff) | |
download | rails-b64fb3020b34a8b9607802613d13e81b362dbae2.tar.gz rails-b64fb3020b34a8b9607802613d13e81b362dbae2.tar.bz2 rails-b64fb3020b34a8b9607802613d13e81b362dbae2.zip |
Failure to rollback t.timestamps when within a change_table migration
When running the following migration:
change_table(:table_name) { |t| t/timestamps }
The following error was produced:
wrong number of arguments (2 for 1) .... /connection_adapters/abstract/schema_statements.rb:851:in `remove_timestamps'
This is due to `arguments` containing an empty hash as its second
argument.
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r-- | activerecord/test/cases/migration/change_table_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/migration/command_recorder_test.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/migration/change_table_test.rb b/activerecord/test/cases/migration/change_table_test.rb index 6613783fba..7010af5434 100644 --- a/activerecord/test/cases/migration/change_table_test.rb +++ b/activerecord/test/cases/migration/change_table_test.rb @@ -95,8 +95,8 @@ module ActiveRecord def test_remove_timestamps_creates_updated_at_and_created_at with_change_table do |t| - @connection.expect :remove_timestamps, nil, [:delete_me] - t.remove_timestamps + @connection.expect :remove_timestamps, nil, [:delete_me, { null: true }] + t.remove_timestamps({ null: true }) end end diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index e955beae1a..8cba777fe2 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -237,8 +237,8 @@ module ActiveRecord end def test_invert_remove_timestamps - add = @recorder.inverse_of :remove_timestamps, [:table] - assert_equal [:add_timestamps, [:table], nil], add + add = @recorder.inverse_of :remove_timestamps, [:table, { null: true }] + assert_equal [:add_timestamps, [:table, {null: true }], nil], add end def test_invert_add_reference |