diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 12:09:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 12:09:38 +0300 |
commit | bc9b43904d491c7b864c8fb6ba06ae0f6625db0d (patch) | |
tree | ca0a5ae3bbbf98530707b96a7db08d1bd773b429 /spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb | |
parent | 10476ea7d8253d8462e092ed95aedc01204238bc (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.rb | 5 |
1 files changed, 3 insertions, 2 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 index 6c6121c70e4..899074399a1 100644 --- a/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb +++ b/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb @@ -10,11 +10,12 @@ RSpec.describe UpdateImportSourcesOnApplicationSettings, feature_category: :migr describe "#up" do it 'removes google_code and preserves existing valid import sources' do - settings.create!(import_sources: import_sources_with_google) + record = settings.create!(import_sources: import_sources_with_google.to_yaml) migrate! - expect(YAML.safe_load(ApplicationSetting.last.import_sources)).to eq(import_sources_without_google) + expect(record.reload.import_sources).to start_with('---') + expect(ApplicationSetting.last.import_sources).to eq(import_sources_without_google) end end end |