diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb index fd9abc09c57..ee0e38bd373 100644 --- a/spec/models/project_services/jira_service_spec.rb +++ b/spec/models/project_services/jira_service_spec.rb @@ -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))