Skip to content
Snippets Groups Projects
Commit ae83ac99 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files
parent 6da27aa6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -201,7 +201,7 @@ describe API::API, api: true do
project.team << [user, :developer]
end
 
def path_from_ref(ref = pipeline.ref, job = build.name)
def path_for_ref(ref = pipeline.ref, job = build.name)
api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", user)
end
 
Loading
Loading
@@ -209,7 +209,7 @@ describe API::API, api: true do
let(:user) { nil }
 
before do
get path_from_ref
get path_for_ref
end
 
it { expect(response).to have_http_status(401) }
Loading
Loading
@@ -222,7 +222,7 @@ describe API::API, api: true do
 
context 'has no such ref' do
before do
get path_from_ref('TAIL', build.name)
get path_for_ref('TAIL', build.name)
end
 
it('gives 404') { verify }
Loading
Loading
@@ -230,7 +230,7 @@ describe API::API, api: true do
 
context 'has no such build' do
before do
get path_from_ref(pipeline.ref, 'NOBUILD')
get path_for_ref(pipeline.ref, 'NOBUILD')
end
 
it('gives 404') { verify }
Loading
Loading
@@ -260,7 +260,7 @@ describe API::API, api: true do
end
 
before do
get path_from_ref('master')
get path_for_ref('master')
end
 
it('gives the file') { verify }
Loading
Loading
@@ -273,7 +273,7 @@ describe API::API, api: true do
end
 
before do
get path_from_ref('improve/awesome')
get path_for_ref('improve/awesome')
end
 
it('gives the file') { verify }
Loading
Loading
@@ -287,7 +287,7 @@ describe API::API, api: true do
end
 
before do
get path_from_ref
get path_for_ref
end
 
it('gives the file') { verify }
Loading
Loading
@@ -300,7 +300,7 @@ describe API::API, api: true do
end
 
before do
get path_from_ref
get path_for_ref
end
 
it('gives the file') { verify }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment