summaryrefslogtreecommitdiff
path: root/spec/features/builds_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/builds_spec.rb')
-rw-r--r--spec/features/builds_spec.rb27
1 files changed, 8 insertions, 19 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb
index df221ab1f3b..cb94432dbd0 100644
--- a/spec/features/builds_spec.rb
+++ b/spec/features/builds_spec.rb
@@ -93,9 +93,7 @@ describe "Builds" do
end
it 'has button to download artifacts' do
- page.within('.artifacts') do
- expect(page).to have_content 'Download'
- end
+ expect(page).to have_content 'Download'
end
end
@@ -107,9 +105,7 @@ describe "Builds" do
end
it do
- page.within('.build-controls') do
- expect(page).to have_link 'Raw'
- end
+ expect(page).to have_link 'Raw'
end
end
end
@@ -165,15 +161,10 @@ describe "Builds" do
end
describe "GET /:project/builds/:id/download" do
- context "Build from project" do
- before do
- @build.update_attributes(artifacts_file: artifacts_file)
- visit namespace_project_build_path(@project.namespace, @project, @build)
- page.within('.artifacts') { click_link 'Download' }
- end
-
- it { expect(page.status_code).to eq(200) }
- it { expect(page.response_headers['Content-Type']).to eq(artifacts_file.content_type) }
+ before do
+ @build.update_attributes(artifacts_file: artifacts_file)
+ visit namespace_project_build_path(@project.namespace, @project, @build)
+ click_link 'Download'
end
context "Build from other project" do
@@ -246,10 +237,8 @@ describe "Builds" do
it { expect(page.status_code).to eq(200) }
end
- context "Build from other project" do
- before do
- visit status_namespace_project_build_path(@project.namespace, @project, @build2)
- end
+ it 'sends the right headers' do
+ click_link 'Raw'
it { expect(page.status_code).to eq(404) }
end