diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-03-30 09:05:02 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-04-07 17:24:11 +0200 |
commit | 9082d1e046a8da394ea0b271f9f3fea909bb102c (patch) | |
tree | d3b91aa3bc0321be433ee0a50d447e02871af3f2 /spec | |
parent | 2d246df57dd8e7da8c2743fba38d31992bc7a3fc (diff) | |
download | gitlab-ce-9082d1e046a8da394ea0b271f9f3fea909bb102c.tar.gz |
Rename Ci::PipelineStatus -> Ci::ProjectBuildStatus
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/ci_status_helper_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/cache/ci/project_build_status_spec.rb (renamed from spec/models/ci/pipeline_status_spec.rb) | 2 | ||||
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 5 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/spec/helpers/ci_status_helper_spec.rb b/spec/helpers/ci_status_helper_spec.rb index 174cc84a97b..9174db59ee3 100644 --- a/spec/helpers/ci_status_helper_spec.rb +++ b/spec/helpers/ci_status_helper_spec.rb @@ -19,7 +19,11 @@ describe CiStatusHelper do describe "#pipeline_status_cache_key" do it "builds a cache key for pipeline status" do - pipeline_status = Ci::PipelineStatus.new(build(:project), sha: "123abc", status: "success") + pipeline_status = Gitlab::Cache::Ci::ProjectBuildStatus.new( + build(:project), + sha: "123abc", + status: "success" + ) expect(helper.pipeline_status_cache_key(pipeline_status)).to eq("pipeline-status/123abc-success") end end diff --git a/spec/models/ci/pipeline_status_spec.rb b/spec/lib/gitlab/cache/ci/project_build_status_spec.rb index bc5b71666c2..b7504788255 100644 --- a/spec/models/ci/pipeline_status_spec.rb +++ b/spec/lib/gitlab/cache/ci/project_build_status_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Ci::PipelineStatus do +describe Gitlab::Cache::Ci::ProjectBuildStatus do let(:project) { create(:project) } let(:pipeline_status) { described_class.new(project) } diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 32aa2f4b336..3f893fd3166 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -1084,8 +1084,9 @@ describe Ci::Pipeline, models: true do it 'updates the cached status' do fake_status = double - # after updating the status, the status is set to `skipped` for this pipeline's builds - expect(Ci::PipelineStatus).to receive(:new).with(pipeline.project, sha: '123456', status: 'skipped').and_return(fake_status) + expect(Gitlab::Cache::Ci::ProjectBuildStatus).to receive(:new). + with(pipeline.project, sha: '123456', status: 'skipped'). + and_return(fake_status) expect(fake_status).to receive(:store_in_cache_if_needed) pipeline.update_status diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 6d4ef78f8ec..c721b79f5d8 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1949,7 +1949,7 @@ describe Project, models: true do describe '#pipeline_status' do let(:project) { create(:project) } it 'builds a pipeline status' do - expect(project.pipeline_status).to be_a(Ci::PipelineStatus) + expect(project.pipeline_status).to be_a(Gitlab::Cache::Ci::ProjectBuildStatus) end it 'hase a loaded pipeline status' do |