summaryrefslogtreecommitdiff
path: root/spec/models/ci/pipeline_spec.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-06-02 12:16:11 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-06-02 12:16:11 +0200
commitfe0b2f81c7c9680a11288e0cdffc3e80dc1e8d58 (patch)
treefd19bea3c1118cb7438f0d2476bad322ccb5c421 /spec/models/ci/pipeline_spec.rb
parentaa0d6b07b6a87459e75c69111643b9d6fe8a97c2 (diff)
downloadgitlab-ce-fe0b2f81c7c9680a11288e0cdffc3e80dc1e8d58.tar.gz
Refine implementation of pipeline stage seeds
Diffstat (limited to 'spec/models/ci/pipeline_spec.rb')
-rw-r--r--spec/models/ci/pipeline_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 17e10a5322e..63dbf1e9d8b 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -208,8 +208,8 @@ describe Ci::Pipeline, models: true do
end
it 'returns preseeded stage seeds object' do
- expect(pipeline.stage_seeds).to be_a Gitlab::Ci::Stage::Seeds
- expect(pipeline.stage_seeds.stages).to all(include(pipeline: pipeline))
+ expect(pipeline.stage_seeds).to all(be_a Gitlab::Ci::Stage::Seed)
+ expect(pipeline.stage_seeds.count).to eq 1
end
end
@@ -513,17 +513,17 @@ describe Ci::Pipeline, models: true do
end
end
- describe '#has_stages?' do
- context 'when pipeline has stages' do
+ describe '#has_stage_seedss?' do
+ context 'when pipeline has stage seeds' do
subject { create(:ci_pipeline_with_one_job) }
- it { is_expected.to have_stages }
+ it { is_expected.to have_stage_seeds }
end
- context 'when pipeline does not have stages' do
+ context 'when pipeline does not have stage seeds' do
subject { create(:ci_pipeline_without_jobs) }
- it { is_expected.not_to have_stages }
+ it { is_expected.not_to have_stage_seeds }
end
end