diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-05 14:47:35 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-06 14:13:21 +0100 |
commit | 13cee6d7fc568f42a43dd78cc86c033d06faf2b3 (patch) | |
tree | a8f00d3cf1f4a634b84f966e6c65c51f460c8650 /spec | |
parent | 10499677e2cbabc6331837d20afc0e0fe68ddc37 (diff) | |
download | gitlab-ce-13cee6d7fc568f42a43dd78cc86c033d06faf2b3.tar.gz |
Fix test failures
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/ci/status/stage/common_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/stage/factory_spec.rb | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/lib/gitlab/ci/status/stage/common_spec.rb b/spec/lib/gitlab/ci/status/stage/common_spec.rb index c3cb30a35e4..f15d6047878 100644 --- a/spec/lib/gitlab/ci/status/stage/common_spec.rb +++ b/spec/lib/gitlab/ci/status/stage/common_spec.rb @@ -2,11 +2,11 @@ require 'spec_helper' describe Gitlab::Ci::Status::Stage::Common do let(:pipeline) { create(:ci_pipeline) } - let(:stage) { Ci::Stage.new(pipeline, 'test') } + let(:stage) { Ci::Stage.new(pipeline, name: 'test') } subject do Class.new(Gitlab::Ci::Status::Core) - .new(pipeline).extend(described_class) + .new(stage).extend(described_class) end it 'does not have action' do diff --git a/spec/lib/gitlab/ci/status/stage/factory_spec.rb b/spec/lib/gitlab/ci/status/stage/factory_spec.rb index a04fd569fc5..2d22bd1e2a0 100644 --- a/spec/lib/gitlab/ci/status/stage/factory_spec.rb +++ b/spec/lib/gitlab/ci/status/stage/factory_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Gitlab::Ci::Status::Stage::Factory do let(:pipeline) { create(:ci_pipeline) } - let(:stage) { Ci::Stage.new(pipeline, 'test') } + let(:stage) { Ci::Stage.new(pipeline, name: 'test') } subject do described_class.new(stage) @@ -15,7 +15,9 @@ describe Gitlab::Ci::Status::Stage::Factory do context 'when stage has a core status' do HasStatus::AVAILABLE_STATUSES.each do |core_status| context "when core status is #{core_status}" do - let(:build) { create(:ci_build, pipeline: pipeline, stage: stage.name, status: core_status) } + let!(:build) do + create(:ci_build, pipeline: pipeline, stage: 'test', status: core_status) + end it "fabricates a core status #{core_status}" do expect(status).to be_a( |