blob: e4385e501b2629401c6a0a9f04d6e3b66c3def70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe DropTemporaryColumnsAndTriggersForTaggings do
let(:taggings_table) { table(:taggings) }
it 'correctly migrates up and down' do
reversible_migration do |migration|
migration.before -> {
expect(taggings_table.column_names).to include('id_convert_to_bigint')
expect(taggings_table.column_names).to include('taggable_id_convert_to_bigint')
}
migration.after -> {
taggings_table.reset_column_information
expect(taggings_table.column_names).not_to include('id_convert_to_bigint')
expect(taggings_table.column_names).not_to include('taggable_id_convert_to_bigint')
}
end
end
end
|