Commit 1ca5e118 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-design-management-router-ce' into 'master'

CE Backport for gitlab-ee!14741 (Fix design management router)

See merge request gitlab-org/gitlab-ce!31090
parents 523e00ab 6ba99cf8
...@@ -500,6 +500,10 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -500,6 +500,10 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get :realtime_changes get :realtime_changes
post :create_merge_request post :create_merge_request
get :discussions, format: :json get :discussions, format: :json
Gitlab.ee do
get 'designs(/*vueroute)', to: 'issues#show', format: false
end
end end
collection do collection do
......
...@@ -251,15 +251,13 @@ describe Projects::IssuesController do ...@@ -251,15 +251,13 @@ describe Projects::IssuesController do
end end
end end
describe 'Redirect after sign in' do # This spec runs as a request-style spec in order to invoke the
# Rails router. A controller-style spec matches the wrong route, and
# session['user_return_to'] becomes incorrect.
describe 'Redirect after sign in', type: :request do
context 'with an AJAX request' do context 'with an AJAX request' do
it 'does not store the visited URL' do it 'does not store the visited URL' do
get :show, params: { get project_issue_path(project, issue), xhr: true
format: :json,
namespace_id: project.namespace,
project_id: project,
id: issue.iid
}, xhr: true
expect(session['user_return_to']).to be_blank expect(session['user_return_to']).to be_blank
end end
...@@ -267,14 +265,9 @@ describe Projects::IssuesController do ...@@ -267,14 +265,9 @@ describe Projects::IssuesController do
context 'without an AJAX request' do context 'without an AJAX request' do
it 'stores the visited URL' do it 'stores the visited URL' do
get :show, get project_issue_path(project, issue)
params: {
namespace_id: project.namespace.to_param,
project_id: project,
id: issue.iid
}
expect(session['user_return_to']).to eq("/#{project.namespace.to_param}/#{project.to_param}/issues/#{issue.iid}") expect(session['user_return_to']).to eq(project_issue_path(project, issue))
end end
end end
end end
......
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