diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-04-19 13:02:41 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-04-19 23:18:43 +0200 |
commit | fa337ca0460b1d7642802b1a27924a4a8f229b13 (patch) | |
tree | 751c7efffbc046dd6912b916b0b59cabc6a2fb5d /spec | |
parent | 0a13f5f86487d7a0dcd26c383a2e32cb496fbcfe (diff) | |
download | gitlab-ce-fa337ca0460b1d7642802b1a27924a4a8f229b13.tar.gz |
Improve and fix specs for raw tracefeature/raw-trace-output
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/builds_spec.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index 8c99dd57a1a..090a941958f 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -96,7 +96,7 @@ describe "Builds" do it do page.within('.build-controls') do - expect(page).to have_content 'Raw' + expect(page).to have_link 'Raw' end end end @@ -137,13 +137,17 @@ describe "Builds" do describe "GET /:project/builds/:id/raw" do before do + Capybara.current_session.driver.header('X-Sendfile-Type', 'X-Sendfile') @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) } + it 'sends the right headers' do + page.within('.build-controls') { click_link 'Raw' } + + expect(page.response_headers['Content-Type']).to eq('text/plain; charset=utf-8') + expect(page.response_headers['X-Sendfile']).to eq(@build.path_to_trace) + end end end |