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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-16 00:07:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-16 00:07:28 +0300
commitd22c6f7410966b5288a8b8e904cd24758e9cec50 (patch)
treeb54768ea1b03a1affb798898e2cf81fd1259e80b /spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb
parenta84aefe0bb8fc2ad47ab67cb4ddcfbb7aecfbd5e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb')
-rw-r--r--spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb b/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb
new file mode 100644
index 00000000000..6c6121c70e4
--- /dev/null
+++ b/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!
+
+RSpec.describe UpdateImportSourcesOnApplicationSettings, feature_category: :migration do
+ let(:settings) { table(:application_settings) }
+ let(:import_sources_with_google) { %w[google_code github git bitbucket bitbucket_server] }
+ let(:import_sources_without_google) { %w[github git bitbucket bitbucket_server] }
+
+ describe "#up" do
+ it 'removes google_code and preserves existing valid import sources' do
+ settings.create!(import_sources: import_sources_with_google)
+
+ migrate!
+
+ expect(YAML.safe_load(ApplicationSetting.last.import_sources)).to eq(import_sources_without_google)
+ end
+ end
+end