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