Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-06-13 15:48:47 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2017-06-13 15:48:47 +0300
commit1039f101c9044be9d898ee1cf3fa31c67e48f349 (patch)
tree3acac5aa4dfb1a4c152990b8f6a576f9556fe43a /spec
parente44502f6158be36ff78bf0ecc7e3af9a570a5e44 (diff)
parent93b555af85ff124820366855ed9b3a9fa719c272 (diff)
Merge branch 'zj-commit-status-sortable-name' into 'master'
Handle legacy jobs without name Closes #33403 See merge request !12118
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/legacy_stage_spec.rb11
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