Skip to content

Commit 770ba38

Browse files
committed
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
2 parents 3e20b83 + 08f754c commit 770ba38

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spec/helpers/import_helper_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@
2828
describe '#provider_project_link' do
2929
context 'when provider is "github"' do
3030
let(:github_server_url) { nil }
31+
let(:provider) { OpenStruct.new(name: 'github', url: github_server_url) }
3132

3233
before do
33-
setting = Settingslogic.new('name' => 'github')
34-
setting['url'] = github_server_url if github_server_url
35-
36-
allow(Gitlab.config.omniauth).to receive(:providers).and_return([setting])
34+
stub_omniauth_setting(providers: [provider])
3735
end
3836

3937
context 'when provider does not specify a custom URL' do

0 commit comments

Comments
 (0)