1
0

emojis_spec.rb 460 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe 'Emojis' do
  4. describe 'GET /emojis/:id' do
  5. let(:emoji) { Fabricate(:custom_emoji, shortcode: 'coolcat') }
  6. it 'returns http success with correct json' do
  7. get "/emojis/#{emoji.id}"
  8. expect(response)
  9. .to have_http_status(200)
  10. expect(response.parsed_body)
  11. .to include(
  12. name: ':coolcat:',
  13. type: 'Emoji'
  14. )
  15. end
  16. end
  17. end