debian-mirror-gitlab/spec/serializers/ci/lint/result_entity_spec.rb

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

17 lines
516 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Ci::Lint::ResultEntity do
describe '#represent' do
let(:yaml_content) { YAML.dump({ rspec: { script: 'test', tags: 'mysql' } }) }
let(:result) { Gitlab::Ci::YamlProcessor.new(yaml_content).execute }
subject(:serialized_linting_result) { described_class.new(result).as_json }
it 'serializes with lint result entity' do
expect(serialized_linting_result.keys).to include(:valid, :errors, :jobs, :warnings)
end
end
end