Skip to content
Snippets Groups Projects

Protected containers: Add DELETE REST API for container protection rules

All threads resolved!
1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
@@ -25,6 +25,7 @@
@@ -25,6 +25,7 @@
let(:valid_project_id) { project.id }
let(:valid_project_id) { project.id }
let(:valid_protection_rule_id) { protection_rule.id }
let(:valid_protection_rule_id) { protection_rule.id }
let(:other_project_id) { other_project.id }
let(:other_project_id) { other_project.id }
 
let(:url) { "/projects/#{project_id}/#{path}" }
where(:project_id, :protection_rule_id, :status) do
where(:project_id, :protection_rule_id, :status) do
ref(:valid_project_id) | 'invalid' | :bad_request
ref(:valid_project_id) | 'invalid' | :bad_request
@@ -33,8 +34,6 @@
@@ -33,8 +34,6 @@
end
end
with_them do
with_them do
let(:url) { "/projects/#{project_id}/#{path}" }
it_behaves_like 'returning response status', params[:status]
it_behaves_like 'returning response status', params[:status]
end
end
end
end
@@ -42,14 +41,14 @@
@@ -42,14 +41,14 @@
RSpec.shared_examples 'rejecting protection rules request when invalid project' do
RSpec.shared_examples 'rejecting protection rules request when invalid project' do
using RSpec::Parameterized::TableSyntax
using RSpec::Parameterized::TableSyntax
 
let(:url) { "/projects/#{project_id}/#{path}" }
 
where(:project_id, :status) do
where(:project_id, :status) do
'invalid' | :not_found
'invalid' | :not_found
non_existing_record_id | :not_found
non_existing_record_id | :not_found
end
end
with_them do
with_them do
let(:url) { "/projects/#{project_id}/#{path}" }
it_behaves_like 'returning response status', params[:status]
it_behaves_like 'returning response status', params[:status]
end
end
end
end
Loading