blob: 74258f036305f728947067323ebfbbb5eb5d37c4 (
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
25
26
|
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe ScheduleFixIncorrectMaxSeatsUsed, :migration do
let(:migration) { described_class.new }
describe '#up' do
it 'schedules a job on Gitlab.com' do
allow(Gitlab).to receive(:com?).and_return(true)
expect(migration).to receive(:migrate_in).with(1.hour, 'FixIncorrectMaxSeatsUsed')
migration.up
end
it 'does not schedule any jobs when not Gitlab.com' do
allow(Gitlab::CurrentSettings).to receive(:com?).and_return(false)
expect(migration).not_to receive(:migrate_in)
migration.up
end
end
end
|