diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-24 17:58:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-24 17:58:42 +0300 |
commit | 172db894b6f2373b73c8363fd0b81fcacc06dbad (patch) | |
tree | f27912ea61644e2b4ba8654955f15795064f0295 /spec/requests | |
parent | c4532d87456f2d52e488084196064654714b62b6 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-ee
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index aa7120e482a..64e010aa50f 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -1400,14 +1400,13 @@ RSpec.describe API::Projects, :aggregate_failures, feature_category: :groups_and it 'disallows creating a project with an import_url that is not reachable' do url = 'http://example.com' endpoint_url = "#{url}/info/refs?service=git-upload-pack" - error_response = { status: 301, body: '', headers: nil } - stub_full_request(endpoint_url, method: :get).to_return(error_response) + stub_full_request(endpoint_url, method: :get).to_return({ status: 301, body: '', headers: nil }) project_params = { import_url: url, path: 'path-project-Foo', name: 'Foo Project' } expect { post api(path, user), params: project_params }.not_to change { Project.count } expect(response).to have_gitlab_http_status(:unprocessable_entity) - expect(json_response['message']).to eq("#{url} endpoint error: #{error_response[:status]}") + expect(json_response['message']).to eq("#{url} is not a valid HTTP Git repository") end it 'creates a project with an import_url that is valid' do |