blob: 8891d8a990793c5800ab46e1791dcedd1ba5a2a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe DropTmpIndexOauthAccessTokensOnIdWhereExpiresInNull, feature_category: :database do
it 'correctly migrates up and down' do
reversible_migration do |migration|
migration.before -> {
expect(ActiveRecord::Base.connection.indexes('oauth_access_tokens').map(&:name))
.to include(described_class::TMP_INDEX)
}
migration.after -> {
expect(ActiveRecord::Base.connection.indexes('oauth_access_tokens').map(&:name))
.not_to include(described_class::TMP_INDEX)
}
end
end
end
|