2022-05-07 20:08:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
require_migration!
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
RSpec.describe AddSecurityTrainingProviders, :migration, feature_category: :vulnerability_management do
|
2022-05-07 20:08:51 +05:30
|
|
|
include MigrationHelpers::WorkItemTypesHelper
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
let!(:security_training_providers) { table(:security_training_providers) }
|
2022-05-07 20:08:51 +05:30
|
|
|
|
|
|
|
it 'creates default data' 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(2)
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|