Commit 112638e6 authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch '294007-git-http-request-specs' into 'master'

Add specs for Git HTTP requests without a service parameter

See merge request gitlab-org/gitlab!53977
parents b1179258 7b618f04
......@@ -382,6 +382,14 @@ RSpec.describe 'Git HTTP requests' do
end
end
end
context 'but the service parameter is missing' do
it 'rejects clones with 403 Forbidden' do
get("/#{path}/info/refs", headers: auth_env(*env.values_at(:user, :password), nil))
expect(response).to have_gitlab_http_status(:forbidden)
end
end
end
context 'and not a member of the team' do
......@@ -409,6 +417,14 @@ RSpec.describe 'Git HTTP requests' do
it_behaves_like 'pushes are allowed'
end
context 'but the service parameter is missing' do
it 'rejects clones with 401 Unauthorized' do
get("/#{path}/info/refs")
expect(response).to have_gitlab_http_status(:unauthorized)
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