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:
authorKamil Trzciński <ayufan@ayufan.eu>2017-01-21 15:21:47 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-01-21 15:21:47 +0300
commit6fe2adda838d7072ff9e960cc80ba7023b53bc34 (patch)
treeec3f42ca3f08d4d0b8d789054a2cd0afa3f7061b /spec
parentbb6f931bc39dc504661767b96436985dfb47d84e (diff)
parent36afc97486e53a8ba70773eaf06b16cce07bd08b (diff)
Merge branch 'fix/pipeline-ref-path-serialization' into 'master'
Do not generate pipeline ref path if ref not present Closes #26861 See merge request !8658
Diffstat (limited to 'spec')
-rw-r--r--spec/serializers/pipeline_entity_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/serializers/pipeline_entity_spec.rb b/spec/serializers/pipeline_entity_spec.rb
index b19464c7117..ccb72973f9c 100644
--- a/spec/serializers/pipeline_entity_spec.rb
+++ b/spec/serializers/pipeline_entity_spec.rb
@@ -134,5 +134,17 @@ describe PipelineEntity do
expect(subject).not_to have_key(:yaml_errors)
end
end
+
+ context 'when pipeline ref is empty' do
+ let(:pipeline) { create(:ci_empty_pipeline) }
+
+ before do
+ allow(pipeline).to receive(:ref).and_return(nil)
+ end
+
+ it 'does not generate branch path' do
+ expect(subject[:ref][:path]).to be_nil
+ end
+ end
end
end