Commit 109553af authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by James Edwards-Jones

Fix EE specs after ci_commit rename to pipeline

parent c3e483b0
...@@ -52,7 +52,7 @@ module Projects ...@@ -52,7 +52,7 @@ module Projects
def create_status def create_status
GenericCommitStatus.new( GenericCommitStatus.new(
project: project, project: project,
commit: build.commit, pipeline: build.pipeline,
user: build.user, user: build.user,
ref: build.ref, ref: build.ref,
stage: 'deploy', stage: 'deploy',
......
...@@ -27,10 +27,10 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps ...@@ -27,10 +27,10 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps
end end
step 'pages are deployed' do step 'pages are deployed' do
commit = @project.ensure_ci_commit(@project.commit('HEAD').sha) pipeline = @project.ensure_pipeline(@project.commit('HEAD').sha, 'HEAD')
build = build(:ci_build, build = build(:ci_build,
project: @project, project: @project,
commit: commit, pipeline: pipeline,
ref: 'HEAD', ref: 'HEAD',
artifacts_file: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip'), artifacts_file: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip'),
artifacts_metadata: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip.meta') artifacts_metadata: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip.meta')
......
...@@ -2,8 +2,8 @@ require "spec_helper" ...@@ -2,8 +2,8 @@ require "spec_helper"
describe Projects::UpdatePagesService do describe Projects::UpdatePagesService do
let(:project) { create :project } let(:project) { create :project }
let(:commit) { create :ci_commit, project: project, sha: project.commit('HEAD').sha } let(:pipeline) { create :ci_pipeline, project: project, sha: project.commit('HEAD').sha }
let(:build) { create :ci_build, commit: commit, ref: 'HEAD' } let(:build) { create :ci_build, pipeline: pipeline, ref: 'HEAD' }
let(:invalid_file) { fixture_file_upload(Rails.root + 'spec/fixtures/dk.png') } let(:invalid_file) { fixture_file_upload(Rails.root + 'spec/fixtures/dk.png') }
subject { described_class.new(project, build) } subject { described_class.new(project, build) }
...@@ -47,7 +47,7 @@ describe Projects::UpdatePagesService do ...@@ -47,7 +47,7 @@ describe Projects::UpdatePagesService do
end end
it 'fails if sha on branch is not latest' do it 'fails if sha on branch is not latest' do
commit.update_attributes(sha: 'old_sha') pipeline.update_attributes(sha: 'old_sha')
build.update_attributes(artifacts_file: file) build.update_attributes(artifacts_file: file)
expect(execute).to_not eq(:success) expect(execute).to_not eq(:success)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment