Welcome to mirror list, hosted at ThFree Co, Russian Federation.

remove_flowdock_integration_records_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3f57515d18bccf8c69a152d011fd81b0526d7ba1 (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 Rails.root.join('db/post_migrate/20221129124240_remove_flowdock_integration_records.rb')

RSpec.describe RemoveFlowdockIntegrationRecords, feature_category: :integrations do
  let(:integrations) { table(:integrations) }

  before do
    integrations.create!(type_new: 'Integrations::Flowdock')
    integrations.create!(type_new: 'SomeOtherType')
  end

  it 'removes integrations records of type_new Integrations::Flowdock' do
    expect(integrations.count).to eq(2)

    migrate!

    expect(integrations.count).to eq(1)
    expect(integrations.first.type_new).to eq('SomeOtherType')
    expect(integrations.where(type_new: 'Integrations::Flowdock')).to be_empty
  end
end