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
This commit is contained in:
Rémy Coutable 2016-11-03 17:23:34 +00:00
commit 651bdd7c34

View file

@ -1,7 +1,8 @@
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))