diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-04-17 18:19:23 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-04-19 23:17:50 +0200 |
commit | 81510b46d5f2f8ee23cd8c5ba5feacee233ef681 (patch) | |
tree | fdb97e80ab240b2526e097bc8ffd7015b4428ae3 /spec/features | |
parent | bf4371d60d651ffddd6b70aaa4bfde4f0e05c388 (diff) | |
download | gitlab-ce-81510b46d5f2f8ee23cd8c5ba5feacee233ef681.tar.gz |
Add feature specs for raw trace
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/builds_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index 6da3a857b3f..8c99dd57a1a 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -86,6 +86,20 @@ describe "Builds" do end end end + + context 'Build raw trace' do + before do + @build.run! + @build.trace = 'BUILD TRACE' + visit namespace_project_build_path(@project.namespace, @project, @build) + end + + it do + page.within('.build-controls') do + expect(page).to have_content 'Raw' + end + end + end end describe "POST /:project/builds/:id/cancel" do @@ -120,4 +134,16 @@ describe "Builds" do it { expect(page.response_headers['Content-Type']).to eq(artifacts_file.content_type) } end + + describe "GET /:project/builds/:id/raw" do + before do + @build.run! + @build.trace = 'BUILD TRACE' + visit namespace_project_build_path(@project.namespace, @project, @build) + page.within('.build-controls') { click_link 'Raw' } + end + + it { expect(page.response_headers['Content-Type']).to eq('text/plain; charset=utf-8') } + it { expect(page.response_headers['X-Sendfile']).to eq(@build.path_to_trace) } + end end |