Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/git_http_spec.rb')
-rw-r--r--spec/requests/git_http_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb
index a3bfa7ea33c..dc735e3714d 100644
--- a/spec/requests/git_http_spec.rb
+++ b/spec/requests/git_http_spec.rb
@@ -433,7 +433,7 @@ RSpec.describe 'Git HTTP requests' do
let(:path) { "#{redirect.path}.git" }
it 'downloads get status 200 for redirects' do
- clone_get(path, {})
+ clone_get(path)
expect(response).to have_gitlab_http_status(:ok)
end
@@ -465,7 +465,7 @@ RSpec.describe 'Git HTTP requests' do
path: "/#{path}/info/refs?service=git-upload-pack"
})
- clone_get(path, env)
+ clone_get(path, **env)
expect(response).to have_gitlab_http_status(:forbidden)
end
@@ -493,7 +493,7 @@ RSpec.describe 'Git HTTP requests' do
it "rejects pulls with 401 Unauthorized for unknown projects (no project existence information leak)" do
user.block
- download('doesnt/exist.git', env) do |response|
+ download('doesnt/exist.git', **env) do |response|
expect(response).to have_gitlab_http_status(:unauthorized)
end
end
@@ -693,7 +693,7 @@ RSpec.describe 'Git HTTP requests' do
end
it 'downloads get status 200' do
- clone_get(path, env)
+ clone_get(path, **env)
expect(response).to have_gitlab_http_status(:ok)
end
@@ -745,7 +745,7 @@ RSpec.describe 'Git HTTP requests' do
# We know for sure it is not an information leak since pulls using
# the build token must be allowed.
it "rejects pushes with 403 Forbidden" do
- push_get(path, env)
+ push_get(path, **env)
expect(response).to have_gitlab_http_status(:forbidden)
expect(response.body).to eq(git_access_error(:auth_upload))
@@ -754,7 +754,7 @@ RSpec.describe 'Git HTTP requests' do
# We are "authenticated" as CI using a valid token here. But we are
# not authorized to see any other project, so return "not found".
it "rejects pulls for other project with 404 Not Found" do
- clone_get("#{other_project.full_path}.git", env)
+ clone_get("#{other_project.full_path}.git", **env)
expect(response).to have_gitlab_http_status(:not_found)
expect(response.body).to eq(git_access_error(:project_not_found))
@@ -777,7 +777,7 @@ RSpec.describe 'Git HTTP requests' do
let(:project) { create(:project) }
it 'rejects pulls with 404 Not Found' do
- clone_get path, env
+ clone_get(path, **env)
expect(response).to have_gitlab_http_status(:not_found)
expect(response.body).to eq(git_access_error(:no_repo))
@@ -785,7 +785,7 @@ RSpec.describe 'Git HTTP requests' do
end
it 'rejects pushes with 403 Forbidden' do
- push_get path, env
+ push_get(path, **env)
expect(response).to have_gitlab_http_status(:forbidden)
expect(response.body).to eq(git_access_error(:auth_upload))
@@ -889,7 +889,7 @@ RSpec.describe 'Git HTTP requests' do
end
it "responds with status 200" do
- clone_get(path, env) do |response|
+ clone_get(path, **env) do |response|
expect(response).to have_gitlab_http_status(:ok)
end
end
@@ -913,7 +913,7 @@ RSpec.describe 'Git HTTP requests' do
end
it 'blocks git access when the user did not accept terms', :aggregate_failures do
- clone_get(path, env) do |response|
+ clone_get(path, **env) do |response|
expect(response).to have_gitlab_http_status(:forbidden)
end
@@ -932,7 +932,7 @@ RSpec.describe 'Git HTTP requests' do
end
it 'allows clones' do
- clone_get(path, env) do |response|
+ clone_get(path, **env) do |response|
expect(response).to have_gitlab_http_status(:ok)
end
end