require'rails_helper'describeImportHelperdodescribe'#github_project_link'docontext'when provider does not specify a custom URL'doit'uses default GitHub URL'doallow(Gitlab.config.omniauth).toreceive(:providers).and_return([Settingslogic.new('name'=>'github')])expect(helper.github_project_link('octocat/Hello-World')).toinclude('href="https://github.com/octocat/Hello-World"')endendcontext'when provider specify a custom URL'doit'uses custom URL'doallow(Gitlab.config.omniauth).toreceive(:providers).and_return([Settingslogic.new('name'=>'github','url'=>'https://github.company.com')])expect(helper.github_project_link('octocat/Hello-World')).toinclude('href="https://github.company.com/octocat/Hello-World"')endendendend