summaryrefslogtreecommitdiff
path: root/spec/serializers/merge_request_basic_serializer_spec.rb
blob: 1fad8e6bc5daaaf9dfbdd62462b707d313646671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe MergeRequestBasicSerializer do
  let(:resource) { create(:merge_request) }
  let(:user)     { create(:user) }

  let(:json_entity) do
    described_class.new(current_user: user)
      .represent(resource, serializer: 'basic')
      .with_indifferent_access
  end

  it 'matches basic merge request json' do
    expect(json_entity).to match_schema('entities/merge_request_basic')
  end
end