diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/legacy_stage_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/ci/legacy_stage_spec.rb b/spec/models/ci/legacy_stage_spec.rb index 48116c7e701..d43c33d3807 100644 --- a/spec/models/ci/legacy_stage_spec.rb +++ b/spec/models/ci/legacy_stage_spec.rb @@ -55,6 +55,17 @@ describe Ci::LegacyStage, :models do expect(stage.groups.map(&:name)) .to eq %w[aaaaa rspec spinach] end + + context 'when a name is nil on legacy pipelines' do + before do + pipeline.builds.first.update_attribute(:name, nil) + end + + it 'returns an array of three groups' do + expect(stage.groups.map(&:name)) + .to eq ['', 'aaaaa', 'rspec', 'spinach'] + end + end end describe '#statuses_count' do |