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

remove_hipchat_service_records_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b89572b069e8d47cdb2b15a0550c03ed7e09169f (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 RemoveHipchatServiceRecords, feature_category: :integrations do
  let(:services) { table(:services) }

  before do
    services.create!(type: 'HipchatService')
    services.create!(type: 'SomeOtherType')
  end

  it 'removes services records of type HipchatService' do
    expect(services.count).to eq(2)

    migrate!

    expect(services.count).to eq(1)
    expect(services.first.type).to eq('SomeOtherType')
    expect(services.where(type: 'HipchatService')).to be_empty
  end
end