summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-07-31 17:26:56 +0000
committerNick Thomas <nick@gitlab.com>2018-07-31 17:26:56 +0000
commit400925c480d95df735862d7edd58cc36cb8fbf68 (patch)
treed98445ea025d3ff64f2d20951f51cc2b789f658e /spec
parent1a95603510accdcdb233fa00f101da119eb1fa5c (diff)
parentc5645a673955d5711bf589ad60ee6607220fdc9d (diff)
downloadgitlab-ce-400925c480d95df735862d7edd58cc36cb8fbf68.tar.gz
Merge branch 'sh-lfs-fix-content-type' into 'master'
Fix LFS uploads not working with git-lfs 2.5.0 Closes #49752 See merge request gitlab-org/gitlab-ce!20923
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/lfs_http_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb
index c2378646f89..e349181b794 100644
--- a/spec/requests/lfs_http_spec.rb
+++ b/spec/requests/lfs_http_spec.rb
@@ -732,7 +732,7 @@ describe 'Git LFS API and storage' do
expect(json_response['objects'].first['oid']).to eq(sample_oid)
expect(json_response['objects'].first['size']).to eq(sample_size)
expect(json_response['objects'].first['actions']['upload']['href']).to eq("#{Gitlab.config.gitlab.url}/#{project.full_path}.git/gitlab-lfs/objects/#{sample_oid}/#{sample_size}")
- expect(json_response['objects'].first['actions']['upload']['header']).to eq('Authorization' => authorization)
+ expect(json_response['objects'].first['actions']['upload']['header']).to eq({ 'Authorization' => authorization, 'Content-Type' => 'application/octet-stream' })
end
end
@@ -761,7 +761,7 @@ describe 'Git LFS API and storage' do
expect(lfs_object.projects.pluck(:id)).not_to include(project.id)
expect(lfs_object.projects.pluck(:id)).to include(other_project.id)
expect(json_response['objects'].first['actions']['upload']['href']).to eq("#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}")
- expect(json_response['objects'].first['actions']['upload']['header']).to eq('Authorization' => authorization)
+ expect(json_response['objects'].first['actions']['upload']['header']).to eq({ 'Authorization' => authorization, 'Content-Type' => 'application/octet-stream' })
end
end
@@ -796,7 +796,7 @@ describe 'Git LFS API and storage' do
expect(json_response['objects'].first['oid']).to eq("91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897")
expect(json_response['objects'].first['size']).to eq(1575078)
expect(json_response['objects'].first['actions']['upload']['href']).to eq("#{project.http_url_to_repo}/gitlab-lfs/objects/91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897/1575078")
- expect(json_response['objects'].first['actions']['upload']['header']).to eq("Authorization" => authorization)
+ expect(json_response['objects'].first['actions']['upload']['header']).to eq({ 'Authorization' => authorization, 'Content-Type' => 'application/octet-stream' })
expect(json_response['objects'].last['oid']).to eq(sample_oid)
expect(json_response['objects'].last['size']).to eq(sample_size)