Commit f431f18e authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'cat-fix-trailing-slash-defaults' into 'master'

Change trailing slash from constraints to default for insights routes

See merge request gitlab-org/gitlab!73593
parents 1ef2c8fa bc5e58ef
......@@ -71,7 +71,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resource :issues_analytics, only: [:show]
resource :insights, only: [:show], trailing_slash: true do
resource :insights, only: [:show], defaults: { trailing_slash: true } do
collection do
post :query
end
......
......@@ -154,7 +154,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
post '/restore' => '/projects#restore', as: :restore
resource :insights, only: [:show], trailing_slash: true do
resource :insights, only: [:show], defaults: { trailing_slash: true } do
collection do
post :query
end
......
......@@ -11,7 +11,7 @@ RSpec.describe Groups::InsightsController do
let(:query_params) { { type: 'bar', query: { issuable_type: 'issue', collection_labels: ['bug'] }, projects: projects_params } }
let(:projects_params) { { only: [project.id, project.full_path] } }
let(:params) { { trailing_slash: true } }
let(:params) { { group_id: parent_group } }
before do
stub_licensed_features(insights: true)
......
......@@ -10,7 +10,7 @@ RSpec.describe Projects::InsightsController do
let(:query_params) { { type: 'bar', query: { issuable_type: 'issue', collection_labels: ['bug'] }, projects: projects_params } }
let(:projects_params) { { only: [project.id, project.full_path] } }
let(:params) { { trailing_slash: true, project_id: project, namespace_id: group } }
let(:params) { { project_id: project, namespace_id: group } }
before do
stub_licensed_features(insights: true)
......
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