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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/migrations/update_application_setting_npm_package_requests_forwarding_default_spec.rb')
-rw-r--r--spec/migrations/update_application_setting_npm_package_requests_forwarding_default_spec.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/migrations/update_application_setting_npm_package_requests_forwarding_default_spec.rb b/spec/migrations/update_application_setting_npm_package_requests_forwarding_default_spec.rb
deleted file mode 100644
index be209536208..00000000000
--- a/spec/migrations/update_application_setting_npm_package_requests_forwarding_default_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdateApplicationSettingNpmPackageRequestsForwardingDefault do
- # Create test data - pipeline and CI/CD jobs.
- let(:application_settings) { table(:application_settings) }
-
- before do
- application_settings.create!(npm_package_requests_forwarding: false)
- end
-
- # Test just the up migration.
- it 'correctly migrates the application setting' do
- expect { migrate! }.to change { current_application_setting }.from(false).to(true)
- end
-
- # Test a reversible migration.
- it 'correctly migrates up and down the application setting' do
- reversible_migration do |migration|
- # Expectations will run before the up migration,
- # and then again after the down migration
- migration.before -> {
- expect(current_application_setting).to eq false
- }
-
- # Expectations will run after the up migration.
- migration.after -> {
- expect(current_application_setting).to eq true
- }
- end
- end
-
- def current_application_setting
- ApplicationSetting.current_without_cache.npm_package_requests_forwarding
- end
-end