gitlab-org--gitlab-foss/spec/serializers/merge_request_basic_serializer_spec.rb

17 lines
421 B
Ruby
Raw Normal View History

2017-05-09 00:15:34 -04:00
require 'spec_helper'
describe MergeRequestBasicSerializer do
let(:resource) { create(:merge_request) }
let(:user) { create(:user) }
2017-10-31 12:15:03 -04:00
let(:json_entity) do
described_class.new(current_user: user)
.represent(resource, serializer: 'basic')
.with_indifferent_access
end
2017-05-09 00:15:34 -04:00
2017-10-31 12:15:03 -04:00
it 'matches basic merge request json' do
expect(json_entity).to match_schema('entities/merge_request_basic')
2017-05-09 00:15:34 -04:00
end
end