Move GID conversion to HAML

Also removed now obsolete test case
parent bcfb40a1
...@@ -12,8 +12,6 @@ module Projects ...@@ -12,8 +12,6 @@ module Projects
.dast_site_profiles .dast_site_profiles
.with_dast_site .with_dast_site
.find(params[:id]) .find(params[:id])
@site_profile_gid = @site_profile.to_global_id
end end
private private
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
.js-dast-site-profile-form{ data: { full_path: @project.path_with_namespace, .js-dast-site-profile-form{ data: { full_path: @project.path_with_namespace,
profiles_library_path: project_profiles_path(@project), profiles_library_path: project_profiles_path(@project),
site_profile: { id: @site_profile_gid.to_s, name: @site_profile.name, target_url: @site_profile.dast_site.url }.to_json } } site_profile: { id: @site_profile.to_global_id.to_s, name: @site_profile.name, target_url: @site_profile.dast_site.url }.to_json } }
...@@ -89,13 +89,5 @@ RSpec.describe Projects::DastSiteProfilesController, type: :request do ...@@ -89,13 +89,5 @@ RSpec.describe Projects::DastSiteProfilesController, type: :request do
it_behaves_like 'a GET request' do it_behaves_like 'a GET request' do
let(:path) { edit_path } let(:path) { edit_path }
end end
it 'assigns DAST site profile global ID' do
with_feature_available
with_user_authorized
get edit_project_dast_site_profile_path(project, dast_site_profile)
expect(assigns(:site_profile_gid)).to eq(dast_site_profile.to_global_id)
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