diff options
author | Stan Hu <stanhu@gmail.com> | 2018-03-15 18:43:50 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-03-15 18:43:50 +0000 |
commit | 770ba3838ce21dd7e788eaf013fb3abd2f5cac91 (patch) | |
tree | 748f744df24e59dd82a72d7354955ee9281121d8 | |
parent | 3e20b83b8b3145abd4e3f09848111d427032d309 (diff) | |
parent | 08f754c6e8a25a421a0d02e3793ad1a9b41da883 (diff) | |
download | gitlab-ce-770ba3838ce21dd7e788eaf013fb3abd2f5cac91.tar.gz |
Merge branch 'fix-import-helper-spec' into 'master'
Fix import helper spec when a previous spec stubs settings
Closes gitlab-ee#5303
See merge request gitlab-org/gitlab-ce!17776
-rw-r--r-- | spec/helpers/import_helper_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/helpers/import_helper_spec.rb b/spec/helpers/import_helper_spec.rb index 57d843c1be2..033155617c6 100644 --- a/spec/helpers/import_helper_spec.rb +++ b/spec/helpers/import_helper_spec.rb @@ -28,12 +28,10 @@ describe ImportHelper do describe '#provider_project_link' do context 'when provider is "github"' do let(:github_server_url) { nil } + let(:provider) { OpenStruct.new(name: 'github', url: github_server_url) } before do - setting = Settingslogic.new('name' => 'github') - setting['url'] = github_server_url if github_server_url - - allow(Gitlab.config.omniauth).to receive(:providers).and_return([setting]) + stub_omniauth_setting(providers: [provider]) end context 'when provider does not specify a custom URL' do |