summaryrefslogtreecommitdiff
path: root/spec/migrations/20210922091402_drop_int4_column_for_push_event_payloads_spec.rb
blob: 8c89cd19f7ffa9113fc6b5486e381d6b97f9a1ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'
require_migration!

RSpec.describe DropInt4ColumnForPushEventPayloads do
  let(:push_event_payloads) { table(:push_event_payloads) }

  it 'correctly migrates up and down' do
    reversible_migration do |migration|
      migration.before -> {
        expect(push_event_payloads.column_names).to include('event_id_convert_to_bigint')
      }

      migration.after -> {
        push_event_payloads.reset_column_information
        expect(push_event_payloads.column_names).not_to include('event_id_convert_to_bigint')
      }
    end
  end
end