Use proper path helpers

parent a590e0d7
- add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), namespace_project_on_demand_scans_path(@project.group, @project)
- add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project)
- breadcrumb_title s_('DastProfiles|Manage profiles')
- page_title s_('DastProfiles|Manage profiles')
......
- add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), namespace_project_on_demand_scans_path(@project.group, @project)
- add_to_breadcrumbs s_('DastProfiles|Manage profiles'), namespace_project_profiles_path(@project.group, @project)
- add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project)
- add_to_breadcrumbs s_('DastProfiles|Manage profiles'), project_profiles_path(@project)
- breadcrumb_title s_('DastProfiles|New site profile')
- page_title s_('DastProfiles|New site profile')
......
......@@ -3,8 +3,7 @@
require 'spec_helper'
RSpec.describe Projects::DastProfilesController, type: :request do
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
let(:project) { create(:project) }
let(:user) { create(:user) }
describe 'GET #index' do
......@@ -22,7 +21,7 @@ RSpec.describe Projects::DastProfilesController, type: :request do
end
it 'can access page' do
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:ok)
end
......@@ -36,7 +35,7 @@ RSpec.describe Projects::DastProfilesController, type: :request do
end
it 'sees a 404 error' do
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:not_found)
end
......@@ -54,7 +53,7 @@ RSpec.describe Projects::DastProfilesController, type: :request do
it 'sees a 404 error' do
stub_feature_flags(security_on_demand_scans_feature_flag: false)
stub_licensed_features(security_on_demand_scans: true)
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:not_found)
end
......@@ -64,7 +63,7 @@ RSpec.describe Projects::DastProfilesController, type: :request do
it 'sees a 404 error' do
stub_feature_flags(security_on_demand_scans_feature_flag: true)
stub_licensed_features(security_on_demand_scans: false)
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:not_found)
end
......
......@@ -3,8 +3,7 @@
require 'spec_helper'
RSpec.describe Projects::DastSiteProfilesController, type: :request do
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
let(:project) { create(:project) }
let(:user) { create(:user) }
describe 'GET #new' do
......@@ -22,7 +21,7 @@ RSpec.describe Projects::DastSiteProfilesController, type: :request do
end
it 'can access page' do
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:ok)
end
......@@ -36,7 +35,7 @@ RSpec.describe Projects::DastSiteProfilesController, type: :request do
end
it 'sees a 404 error' do
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:not_found)
end
......@@ -54,7 +53,7 @@ RSpec.describe Projects::DastSiteProfilesController, type: :request do
it 'sees a 404 error' do
stub_feature_flags(security_on_demand_scans_feature_flag: false)
stub_licensed_features(security_on_demand_scans: true)
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:not_found)
end
......@@ -64,7 +63,7 @@ RSpec.describe Projects::DastSiteProfilesController, type: :request do
it 'sees a 404 error' do
stub_feature_flags(security_on_demand_scans_feature_flag: true)
stub_licensed_features(security_on_demand_scans: false)
get namespace_project_profiles_path(project.group, project)
get project_profiles_path(project)
expect(response).to have_gitlab_http_status(:not_found)
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