diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-15 15:40:53 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-15 15:40:53 +0200 |
commit | 548169cfb57b27cca911d947e2aa6f4f7e6df004 (patch) | |
tree | 94e9d3793cd8738ca7428521518f7dc4f0a539e0 /spec/requests/lfs_http_spec.rb | |
parent | 551787ac5c12a502b46c819939b2fa11684a799c (diff) | |
download | gitlab-ce-548169cfb57b27cca911d947e2aa6f4f7e6df004.tar.gz |
Fix most of specs
Diffstat (limited to 'spec/requests/lfs_http_spec.rb')
-rw-r--r-- | spec/requests/lfs_http_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb index 6e551bb65fa..85290ec05c2 100644 --- a/spec/requests/lfs_http_spec.rb +++ b/spec/requests/lfs_http_spec.rb @@ -586,8 +586,8 @@ describe 'Git LFS API and storage' do context 'when CI is authorized' do let(:authorization) { authorize_ci_project } - it 'responds with 401' do - expect(response).to have_http_status(401) + it 'responds with 403' do + expect(response).to have_http_status(403) end end end @@ -614,7 +614,7 @@ describe 'Git LFS API and storage' do let(:authorization) { authorize_ci_project } it 'responds with status 403' do - expect(response).to have_http_status(401) + expect(response).to have_http_status(403) end end end @@ -897,7 +897,9 @@ describe 'Git LFS API and storage' do end def authorize_ci_project - ActionController::HttpAuthentication::Basic.encode_credentials('gitlab-ci-token', project.runners_token) + pipeline = create(:ci_empty_pipeline, project: project) + build = create(:ci_build, :running, pipeline: pipeline) + ActionController::HttpAuthentication::Basic.encode_credentials('gitlab-ci-token', build.token) end def authorize_user |