summaryrefslogtreecommitdiff
path: root/spec/features/pipelines_spec.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-13 17:11:57 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-13 17:11:57 -0500
commit6d19e13df62376916e024ff44939bf2a8f5b671b (patch)
tree4b5bae7c18ee25ebdc73be3730ed36efd270eef8 /spec/features/pipelines_spec.rb
parentc1bc5c58a2861af25f4f03e0a757dceae4b67cda (diff)
downloadgitlab-ce-6d19e13df62376916e024ff44939bf2a8f5b671b.tar.gz
Fix specs
Diffstat (limited to 'spec/features/pipelines_spec.rb')
-rw-r--r--spec/features/pipelines_spec.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb
index 0e654c3e40f..1df516eafd5 100644
--- a/spec/features/pipelines_spec.rb
+++ b/spec/features/pipelines_spec.rb
@@ -52,15 +52,15 @@ describe "Pipelines" do
before { click_link('Retry') }
it { expect(page).to_not have_link('Retry') }
- it { expect(page).to have_selector('.ci-running') }
+ it { expect(page).to have_selector('.ci-pending') }
end
end
context 'downloadable pipelines' do
- before { visit namespace_project_pipelines_path(project.namespace, project) }
-
context 'with artifacts' do
- let!(:with_artifacts) { create(:ci_build, :success, :artifacts, commit: pipeline, name: 'rspec tests', stage: 'test') }
+ let!(:with_artifacts) { create(:ci_build, :artifacts, :success, commit: pipeline, name: 'rspec tests', stage: 'test') }
+
+ before { visit namespace_project_pipelines_path(project.namespace, project) }
it { expect(page).to have_selector('.build-artifacts') }
it { expect(page).to have_link(with_artifacts.name) }
@@ -78,10 +78,10 @@ describe "Pipelines" do
let(:pipeline) { create(:ci_commit, project: project, ref: 'master') }
before do
- @success = create(:ci_build, :success, commit: pipeline, stage: 'build')
- @failed = create(:ci_build, :failed, commit: pipeline, stage: 'test', commands: 'test')
- @running = create(:ci_build, :running, commit: pipeline, stage: 'deploy')
- @external = create(:generic_commit_status, :success, commit: pipeline, stage: 'external')
+ @success = create(:ci_build, :success, commit: pipeline, stage: 'build', name: 'build')
+ @failed = create(:ci_build, :failed, commit: pipeline, stage: 'test', name: 'test', commands: 'test')
+ @running = create(:ci_build, :running, commit: pipeline, stage: 'deploy', name: 'deploy')
+ @external = create(:generic_commit_status, status: 'success', commit: pipeline, name: 'jenkins', stage: 'external')
end
before { visit namespace_project_pipeline_path(project.namespace, project, pipeline) }
@@ -126,7 +126,10 @@ describe "Pipelines" do
before { visit new_namespace_project_pipeline_path(project.namespace, project) }
context 'for valid commit' do
- before { fill_in('Create for', with: 'master') }
+ before do
+ fill_in('Create for', with: 'master')
+ stub_ci_commit_to_return_yaml_file
+ end
it { expect{ click_on 'Create pipeline' }.to change{ Ci::Commit.count }.by(1) }
end