BigW Consortium Gitlab

Commit 109553af by 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,13 +27,13 @@ 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,
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')
project: @project,
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')
)
result = ::Projects::UpdatePagesService.new(@project, build).execute
expect(result[:status]).to eq(:success)
......
......@@ -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