提交 9bb25ee1 编写于 作者: L Lin Jen-Shin

Use stubs instead of modifying global states

上级 c493f285
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册