summaryrefslogtreecommitdiff
path: root/spec/serializers/ci/dag_pipeline_serializer_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
commit9f46488805e86b1bc341ea1620b866016c2ce5ed (patch)
treef9748c7e287041e37d6da49e0a29c9511dc34768 /spec/serializers/ci/dag_pipeline_serializer_spec.rb
parentdfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff)
downloadgitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/serializers/ci/dag_pipeline_serializer_spec.rb')
-rw-r--r--spec/serializers/ci/dag_pipeline_serializer_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/serializers/ci/dag_pipeline_serializer_spec.rb b/spec/serializers/ci/dag_pipeline_serializer_spec.rb
new file mode 100644
index 00000000000..abf895c3e77
--- /dev/null
+++ b/spec/serializers/ci/dag_pipeline_serializer_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe Ci::DagPipelineSerializer do
+ describe '#represent' do
+ subject { described_class.new.represent(pipeline) }
+
+ let(:pipeline) { create(:ci_pipeline) }
+ let!(:job) { create(:ci_build, pipeline: pipeline) }
+
+ it 'includes stages' do
+ expect(subject[:stages]).to be_present
+ expect(subject[:stages].size).to eq 1
+ end
+ end
+end