gitlab-org--gitlab-foss/spec/migrations/20220314154235_migrate_vulnerability_approval_rules_spec.rb

22 lines
562 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe MigrateVulnerabilityApprovalRules do
describe '#up' do
context 'with an instance that is not EE' do
before do
allow(Gitlab).to receive(:ee?).and_return(false)
end
it 'does not perform any action after guard conditions' do
expect_next_instance_of(MigrateVulnerabilityApprovalRules) do |migration|
expect(migration).not_to receive(:generate_scan_finding_rule_worker)
end
migrate!
end
end
end
end