custom_emoji_serializer_spec.rb 490 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe REST::CustomEmojiSerializer do
  4. subject { serialized_record_json(record, described_class) }
  5. let(:record) { Fabricate.build :custom_emoji, id: 123, category: Fabricate(:custom_emoji_category, name: 'Category Name') }
  6. describe 'serialization' do
  7. it 'returns expected values' do
  8. expect(subject)
  9. .to include(
  10. 'category' => be_a(String).and(eq('Category Name'))
  11. )
  12. end
  13. end
  14. end