diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-16 11:26:48 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-16 11:26:48 +0200 |
commit | 34148d15764898579cc44ea02f439e8359e01233 (patch) | |
tree | f390aff9f58f2f26fab1c99915c9dd73babe6ea0 /spec/features | |
parent | 95f0440a7823a927ebba1557b091c12255e49ac4 (diff) | |
parent | bd3689e9e0aebe43f7c5f787e03a3bbaa8b2ef68 (diff) | |
download | gitlab-ce-34148d15764898579cc44ea02f439e8359e01233.tar.gz |
Merge branch 'master' into rs-redactor-filterrs-redactor-filter
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/builds_spec.rb | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index 924047a0d8f..154857e77fe 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -9,6 +9,54 @@ describe "Builds" do @gl_project.team << [@user, :master] end + describe "GET /:project/builds" do + context "Running scope" do + before do + @build.run! + visit namespace_project_builds_path(@gl_project.namespace, @gl_project) + end + + it { expect(page).to have_content 'Running' } + it { expect(page).to have_content 'Cancel all' } + it { expect(page).to have_content @build.short_sha } + it { expect(page).to have_content @build.ref } + it { expect(page).to have_content @build.name } + end + + context "Finished scope" do + before do + @build.run! + visit namespace_project_builds_path(@gl_project.namespace, @gl_project, scope: :finished) + end + + it { expect(page).to have_content 'No builds to show' } + it { expect(page).to have_content 'Cancel all' } + end + + context "All builds" do + before do + @gl_project.ci_builds.running_or_pending.each(&:success) + visit namespace_project_builds_path(@gl_project.namespace, @gl_project, scope: :all) + end + + it { expect(page).to have_content 'All' } + it { expect(page).to have_content @build.short_sha } + it { expect(page).to have_content @build.ref } + it { expect(page).to have_content @build.name } + it { expect(page).to_not have_content 'Cancel all' } + end + end + + describe "GET /:project/builds/:id/cancel_all" do + before do + @build.run! + visit cancel_all_namespace_project_builds_path(@gl_project.namespace, @gl_project) + end + + it { expect(page).to have_content 'No builds to show' } + it { expect(page).to_not have_content 'Cancel all' } + end + describe "GET /:project/builds/:id" do before do visit namespace_project_build_path(@gl_project.namespace, @gl_project, @build) |