diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-26 03:11:30 +0300 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-08-26 19:32:42 +0300 |
commit | bf84a1cbbe9115ef412a1454c31c1520354c816e (patch) | |
tree | 5e8a2664b9bf199a91b8aebe2f48da2aff2ffcbd /spec | |
parent | ef5758469698d82c181c6480d160aa5e2475728a (diff) |
Merge branch 'fix-external-issue-tracker-link' into 'master'
Fix external issue tracker "Issues" link leading to 404s
## What does this MR do?
This MR fixes the redirection to the wrong URL when using an external issue tracker, such as JIRA or Redmine. a70431f874 modified the behavior to link to the external issue tracker
issues URL instead of the project path URL. This restores the previous behavior.
## Why was this MR needed?
The issues URL often has `:id` associated with it for linking mentioned issues.
For external issue trackers, the project page is the intended target.
## What are the relevant issue numbers?
Closes #21252
Related to #21402
See merge request !6006
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 0836b71056c..16929767ddf 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -8,13 +8,13 @@ describe Projects::IssuesController do describe "GET #index" do context 'external issue tracker' do it 'redirects to the external issue tracker' do - external = double(issues_url: 'https://example.com/issues') + external = double(project_path: 'https://example.com/project') allow(project).to receive(:external_issue_tracker).and_return(external) controller.instance_variable_set(:@project, project) get :index, namespace_id: project.namespace.path, project_id: project - expect(response).to redirect_to('https://example.com/issues') + expect(response).to redirect_to('https://example.com/project') end end |