diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) | |
download | gitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb')
-rw-r--r-- | spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb b/spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb new file mode 100644 index 00000000000..74258f03630 --- /dev/null +++ b/spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb @@ -0,0 +1,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 |