emojis_controller_spec.rb 401 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe EmojisController do
  4. render_views
  5. let(:emoji) { Fabricate(:custom_emoji) }
  6. describe 'GET #show' do
  7. let(:response) { get :show, params: { id: emoji.id, format: :json } }
  8. it 'returns the right response' do
  9. expect(response).to have_http_status 200
  10. expect(body_as_json[:name]).to eq ':coolcat:'
  11. end
  12. end
  13. end