rule_serializer_spec.rb 391 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe REST::RuleSerializer do
  4. subject { serialized_record_json(record, described_class) }
  5. let(:record) { Fabricate.build :rule, id: 123 }
  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. )
  12. end
  13. end
  14. end