Commit 651bdd7c authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'no-include-on-top-level' into 'master'

Don't include Gitlab::Routing.url_helpers on top-level namespace (fix error for url_for)

## What does this MR do?

Tries to fix:

```
     ActionView::Template::Error:
      arguments passed to url_for can't be handled. Please require routes or provide your own implementation
```

One of the failed build: https://gitlab.com/gitlab-org/gitlab-ce/builds/5825797

See merge request !7265
parents d8153e31 9bb25ee1
require 'spec_helper'
include Gitlab::Routing.url_helpers
describe JiraService, models: true do
include Gitlab::Routing.url_helpers
describe "Associations" do
it { is_expected.to belong_to :project }
it { is_expected.to have_one :service_hook }
......@@ -79,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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment