blob: 706e0b144923446c6126598270aefe380532fafa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe RemoveBuildsEmailServiceFromServices, feature_category: :navigation do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:services) { table(:services) }
let(:namespace) { namespaces.create!(name: 'foo', path: 'bar') }
let(:project) { projects.create!(namespace_id: namespace.id) }
it 'correctly deletes `BuildsEmailService` services' do
services.create!(project_id: project.id, type: 'BuildsEmailService')
services.create!(project_id: project.id, type: 'OtherService')
expect(services.all.pluck(:type)).to match_array %w[BuildsEmailService OtherService]
migrate!
expect(services.all.pluck(:type)).to eq %w[OtherService]
end
end
|