You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
438 B

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