BigW Consortium Gitlab

Commit 2e90abf2 by Lin Jen-Shin

It could be redirecting or downloading in Rails or API

parent e96401f0
......@@ -227,7 +227,7 @@ describe API::API, api: true do
expect(response.headers).to include(download_headers)
end
it_behaves_like 'artifacts from ref with 302'
it_behaves_like 'artifacts from ref successfully'
end
end
......
......@@ -45,7 +45,7 @@ describe Projects::ArtifactsController do
expect(response).to redirect_to(path)
end
it_behaves_like 'artifacts from ref with 302'
it_behaves_like 'artifacts from ref successfully'
end
end
end
......@@ -29,13 +29,13 @@ shared_examples 'artifacts from ref with 404' do
end
end
shared_examples 'artifacts from ref with 302' do
shared_examples 'artifacts from ref successfully' do
context 'with sha' do
before do
get path_from_ref
end
it('redirects') { verify }
it('gives the file') { verify }
end
context 'with regular branch' do
......@@ -47,7 +47,7 @@ shared_examples 'artifacts from ref with 302' do
get path_from_ref('master')
end
it('redirects') { verify }
it('gives the file') { verify }
end
context 'with branch name containing slash' do
......@@ -59,7 +59,7 @@ shared_examples 'artifacts from ref with 302' do
get path_from_ref('improve/awesome')
end
it('redirects') { verify }
it('gives the file') { verify }
end
context 'with latest build' do
......@@ -73,7 +73,7 @@ shared_examples 'artifacts from ref with 302' do
get path_from_ref
end
it('redirects') { verify }
it('gives the file') { verify }
end
context 'with success build' do
......@@ -86,6 +86,6 @@ shared_examples 'artifacts from ref with 302' do
get path_from_ref
end
it('redirects') { verify }
it('gives the file') { verify }
end
end
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