2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe MergeRequestBasicSerializer do
|
|
|
|
let(:resource) { create(:merge_request) }
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
let(:json_entity) do
|
|
|
|
described_class.new(current_user: user)
|
|
|
|
.represent(resource, serializer: 'basic')
|
|
|
|
.with_indifferent_access
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
it 'matches basic merge request json' do
|
|
|
|
expect(json_entity).to match_schema('entities/merge_request_basic')
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
end
|