Skip to content
Snippets Groups Projects
Commit 9bb25ee1 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Use stubs instead of modifying global states

parent c493f285
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -80,7 +80,9 @@ describe JiraService, models: true do
stub_config_setting(relative_url_root: '/gitlab')
stub_config_setting(url: Settings.send(:build_gitlab_url))
 
Project.default_url_options[:script_name] = "/gitlab"
allow(JiraService).to receive(:default_url_options) do
{ script_name: '/gitlab' }
end
 
@jira_service.execute(merge_request, ExternalIssue.new("JIRA-123", project))
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment