Commit d1e57b99 authored by Matt Kasa's avatar Matt Kasa

Fixes message for 403 creating a Terraform Module package

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/330844
parent 645e82d0
......@@ -7,7 +7,7 @@ module Packages
def execute
return error('Version is empty.', 400) if params[:module_version].blank?
return error('Package already exists.', 403) if current_package_exists_elsewhere?
return error('Access Denied', 403) if current_package_exists_elsewhere?
return error('Package version already exists.', 403) if current_package_version_exists?
return error('File is too large.', 400) if file_size_exceeded?
......
......@@ -37,7 +37,7 @@ RSpec.describe Packages::TerraformModule::CreatePackageService do
let!(:existing_package) { create(:terraform_module_package, project: project2, name: 'foo/bar', version: '1.0.0') }
it { expect(subject[:http_status]).to eq 403 }
it { expect(subject[:message]).to be 'Package already exists.' }
it { expect(subject[:message]).to be 'Access Denied' }
end
context 'version already exists' do
......
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