debian-mirror-gitlab/spec/serializers/ci/dag_pipeline_serializer_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
526 B
Ruby
Raw Permalink Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Ci::DagPipelineSerializer do
2020-05-24 23:13:21 +05:30
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
2020-07-28 23:09:34 +05:30
it 'matches schema' do
expect(subject.to_json).to match_schema('entities/dag_pipeline')
end
2020-05-24 23:13:21 +05:30
end
end