summaryrefslogtreecommitdiff
path: root/spec/features/pipelines_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/pipelines_spec.rb')
-rw-r--r--spec/features/pipelines_spec.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb
index acd6fb3538c..98703ef3ac4 100644
--- a/spec/features/pipelines_spec.rb
+++ b/spec/features/pipelines_spec.rb
@@ -12,7 +12,7 @@ describe "Pipelines" do
end
describe 'GET /:project/pipelines' do
- let!(:pipeline) { create(:ci_commit, project: project, ref: 'master', status: 'running') }
+ let!(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', status: 'running') }
[:all, :running, :branches].each do |scope|
context "displaying #{scope}" do
@@ -31,7 +31,7 @@ describe "Pipelines" do
end
context 'cancelable pipeline' do
- let!(:running) { create(:ci_build, :running, commit: pipeline, stage: 'test', commands: 'test') }
+ let!(:running) { create(:ci_build, :running, pipeline: pipeline, stage: 'test', commands: 'test') }
before { visit namespace_project_pipelines_path(project.namespace, project) }
@@ -47,7 +47,7 @@ describe "Pipelines" do
end
context 'retryable pipelines' do
- let!(:failed) { create(:ci_build, :failed, commit: pipeline, stage: 'test', commands: 'test') }
+ let!(:failed) { create(:ci_build, :failed, pipeline: pipeline, stage: 'test', commands: 'test') }
before { visit namespace_project_pipelines_path(project.namespace, project) }
@@ -64,7 +64,7 @@ describe "Pipelines" do
context 'for generic statuses' do
context 'when running' do
- let!(:running) { create(:generic_commit_status, status: 'running', commit: pipeline, stage: 'test') }
+ let!(:running) { create(:generic_commit_status, status: 'running', pipeline: pipeline, stage: 'test') }
before { visit namespace_project_pipelines_path(project.namespace, project) }
@@ -78,7 +78,7 @@ describe "Pipelines" do
end
context 'when failed' do
- let!(:running) { create(:generic_commit_status, status: 'failed', commit: pipeline, stage: 'test') }
+ let!(:running) { create(:generic_commit_status, status: 'failed', pipeline: pipeline, stage: 'test') }
before { visit namespace_project_pipelines_path(project.namespace, project) }
@@ -94,7 +94,7 @@ describe "Pipelines" do
context 'downloadable pipelines' do
context 'with artifacts' do
- let!(:with_artifacts) { create(:ci_build, :artifacts, :success, commit: pipeline, name: 'rspec tests', stage: 'test') }
+ let!(:with_artifacts) { create(:ci_build, :artifacts, :success, pipeline: pipeline, name: 'rspec tests', stage: 'test') }
before { visit namespace_project_pipelines_path(project.namespace, project) }
@@ -103,7 +103,7 @@ describe "Pipelines" do
end
context 'without artifacts' do
- let!(:without_artifacts) { create(:ci_build, :success, commit: pipeline, name: 'rspec', stage: 'test') }
+ let!(:without_artifacts) { create(:ci_build, :success, pipeline: pipeline, name: 'rspec', stage: 'test') }
it { expect(page).not_to have_selector('.build-artifacts') }
end
@@ -111,13 +111,13 @@ describe "Pipelines" do
end
describe 'GET /:project/pipelines/:id' do
- let(:pipeline) { create(:ci_commit, project: project, ref: 'master') }
+ let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master') }
before do
- @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')
+ @success = create(:ci_build, :success, pipeline: pipeline, stage: 'build', name: 'build')
+ @failed = create(:ci_build, :failed, pipeline: pipeline, stage: 'test', name: 'test', commands: 'test')
+ @running = create(:ci_build, :running, pipeline: pipeline, stage: 'deploy', name: 'deploy')
+ @external = create(:generic_commit_status, status: 'success', pipeline: pipeline, name: 'jenkins', stage: 'external')
end
before { visit namespace_project_pipeline_path(project.namespace, project, pipeline) }
@@ -165,9 +165,9 @@ describe "Pipelines" do
before { fill_in('Create for', with: 'master') }
context 'with gitlab-ci.yml' do
- before { stub_ci_commit_to_return_yaml_file }
+ before { stub_ci_pipeline_to_return_yaml_file }
- it { expect{ click_on 'Create pipeline' }.to change{ Ci::Commit.count }.by(1) }
+ it { expect{ click_on 'Create pipeline' }.to change{ Ci::Pipeline.count }.by(1) }
end
context 'without gitlab-ci.yml' do