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
def create_status
GenericCommitStatus.new(
project: project,
commit: build.commit,
pipeline: build.pipeline,
user: build.user,
ref: build.ref,
stage: 'deploy',
......
......@@ -27,10 +27,10 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps
end
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,
project: @project,
commit: commit,
pipeline: pipeline,
ref: 'HEAD',
artifacts_file: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip'),
artifacts_metadata: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip.meta')
......
......@@ -2,8 +2,8 @@ require "spec_helper"
describe Projects::UpdatePagesService do
let(:project) { create :project }
let(:commit) { create :ci_commit, project: project, sha: project.commit('HEAD').sha }
let(:build) { create :ci_build, commit: commit, ref: 'HEAD' }
let(:pipeline) { create :ci_pipeline, project: project, sha: project.commit('HEAD').sha }
let(:build) { create :ci_build, pipeline: pipeline, ref: 'HEAD' }
let(:invalid_file) { fixture_file_upload(Rails.root + 'spec/fixtures/dk.png') }
subject { described_class.new(project, build) }
......@@ -47,7 +47,7 @@ describe Projects::UpdatePagesService do
end
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)
expect(execute).to_not eq(:success)
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