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

20230328030101_add_secureflag_training_provider_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 774ea89937a529d03200024994392f0f1d988c44 (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
# frozen_string_literal: true

require 'spec_helper'
require_migration!

RSpec.describe AddSecureflagTrainingProvider, :migration, feature_category: :vulnerability_management do
  include MigrationHelpers::WorkItemTypesHelper

  let!(:security_training_providers) { table(:security_training_providers) }

  it 'adds additional provider' do
    # Need to delete all as security training providers are seeded before entire test suite
    security_training_providers.delete_all

    reversible_migration do |migration|
      migration.before -> {
        expect(security_training_providers.count).to eq(0)
      }

      migration.after -> {
        expect(security_training_providers.count).to eq(1)
      }
    end
  end
end