diff options
author | Sean McGivern <sean@gitlab.com> | 2018-03-15 16:26:50 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-03-15 16:26:50 +0000 |
commit | 08f754c6e8a25a421a0d02e3793ad1a9b41da883 (patch) | |
tree | 22b06ef2e4c4d312672ca1d843efceefdef93d4e /spec | |
parent | 81d370d419cf7799128dd8498a5a8c21d220acb7 (diff) | |
download | gitlab-ce-08f754c6e8a25a421a0d02e3793ad1a9b41da883.tar.gz |
Fix import helper spec when a previous spec stubs settings
This should use stub_omniauth_setting, not do it manually.
Diffstat (limited to 'spec')
-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 |