Commit 8267ded1 authored by Toon Claes's avatar Toon Claes

Add test to transfer avatar with mount_point=nil

See what is mentioned in
https://gitlab.com/gitlab-org/gitlab/issues/38088#note_284330146
actually happens.
parent 492cb519
......@@ -139,6 +139,18 @@ describe API::Geo do
expect(response).to have_gitlab_http_status(404)
end
end
context 'avatar has mount_point nil' do
it 'responds with 200 with X-Sendfile' do
upload.update(mount_point: nil)
get api("/geo/transfers/avatar/#{upload.id}"), headers: req_header
expect(response).to have_gitlab_http_status(200)
expect(response.headers['Content-Type']).to eq('application/octet-stream')
expect(response.headers['X-Sendfile']).to eq(user.avatar.path)
end
end
end
describe 'GET /geo/transfers/file/1' 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