account_warning_serializer_spec.rb 493 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe REST::AccountWarningSerializer do
  4. subject { serialized_record_json(record, described_class) }
  5. let(:record) { Fabricate :account_warning, id: 123, status_ids: [456, 789] }
  6. describe 'serialization' do
  7. it 'returns expected values' do
  8. expect(subject)
  9. .to include(
  10. 'id' => be_a(String).and(eq('123')),
  11. 'status_ids' => be_a(Array).and(eq(['456', '789']))
  12. )
  13. end
  14. end
  15. end