diff options
Diffstat (limited to 'spec/migrations/20230328030101_add_secureflag_training_provider_spec.rb')
-rw-r--r-- | spec/migrations/20230328030101_add_secureflag_training_provider_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/migrations/20230328030101_add_secureflag_training_provider_spec.rb b/spec/migrations/20230328030101_add_secureflag_training_provider_spec.rb new file mode 100644 index 00000000000..774ea89937a --- /dev/null +++ b/spec/migrations/20230328030101_add_secureflag_training_provider_spec.rb @@ -0,0 +1,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 |