diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-14 14:21:49 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-14 17:38:26 +0200 |
commit | d9ece71ef0677a1d3468697485db7cbcf1b83745 (patch) | |
tree | 9af7f58de6b61833495a8578454edd2d224c366b /spec/features | |
parent | 4d69c6a3361bbc673e853995e3896d31241aa748 (diff) | |
download | gitlab-ce-d9ece71ef0677a1d3468697485db7cbcf1b83745.tar.gz |
Fix specs
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/builds_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index 31f8aa83981..a339a151112 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -10,40 +10,40 @@ describe "Builds" do end describe "GET /:project/builds" do - context "All builds" do + context "Running scope" do before do - @build.success + @build.run! visit namespace_project_builds_path(@gl_project.namespace, @gl_project) end - it { expect(page).to have_content 'All builds' } + 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 } - it { expect(page).to_not have_content 'Cancel all' } end - context "Pending scope" do + context "Finished scope" do before do - @build.success - visit namespace_project_builds_path(@gl_project.namespace, @gl_project, scope: :pending) + @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_not have_content 'Cancel all' } + it { expect(page).to have_content 'Cancel all' } end - context "Running scope" do + context "All builds" do before do - @build.run! - visit namespace_project_builds_path(@gl_project.namespace, @gl_project, scope: :running) + @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 'Running' } - it { expect(page).to have_content 'Cancel all' } + 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 @@ -53,7 +53,7 @@ describe "Builds" do visit cancel_namespace_project_build_path(@gl_project.namespace, @gl_project, @build) end - it { expect(page).to have_content 'All builds' } + it { expect(page).to have_content 'All' } it { expect(page).to have_content 'canceled' } it { expect(page).to_not have_content 'Cancel all' } end |