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