diff options
author | Sean McGivern <sean@gitlab.com> | 2018-12-31 16:42:54 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-12-31 16:42:54 +0300 |
commit | ca14b70d5201852751d79d6a0827b81689fff5be (patch) | |
tree | 63f8f322f9bdbb2f288c48676eb16b5906399cdf /spec/requests | |
parent | a352a95e9a4e6e925e43e1b0a3dc2cac6d33cef4 (diff) | |
parent | 2cd47bba9a4ee1b503b37c548826ef527c4e49ba (diff) |
Merge branch 'fj-55781-fix-api-blob-content-disposition' into 'master'
Fixed content-disposition in blob and files API endpoint
Closes #55781
See merge request gitlab-org/gitlab-ce!24078
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/files_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/repositories_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb index 0ba1f2d7a2b..a0aee937185 100644 --- a/spec/requests/api/files_spec.rb +++ b/spec/requests/api/files_spec.rb @@ -190,7 +190,7 @@ describe API::Files do get api(url, current_user), params: params - expect(headers['Content-Disposition']).to match(/^attachment/) + expect(headers['Content-Disposition']).to eq('attachment; filename="popen.rb"') end context 'when mandatory params are not given' do diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb index 181fe6246ae..b6b57803a6a 100644 --- a/spec/requests/api/repositories_spec.rb +++ b/spec/requests/api/repositories_spec.rb @@ -171,7 +171,7 @@ describe API::Repositories do it 'forces attachment content disposition' do get api(route, current_user) - expect(headers['Content-Disposition']).to match(/^attachment/) + expect(headers['Content-Disposition']).to eq 'attachment' end context 'when sha does not exist' do |