2024-08-27 00:00:05 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 14:12:25 +09:00
|
|
|
RSpec.describe 'Emojis' do
|
2024-08-27 00:00:05 +09:00
|
|
|
describe 'GET /emojis/:id' do
|
|
|
|
let(:emoji) { Fabricate(:custom_emoji, shortcode: 'coolcat') }
|
|
|
|
|
|
|
|
it 'returns http success with correct json' do
|
|
|
|
get "/emojis/#{emoji.id}"
|
|
|
|
|
|
|
|
expect(response)
|
|
|
|
.to have_http_status(200)
|
2024-09-06 18:58:46 +09:00
|
|
|
expect(response.parsed_body)
|
2024-08-27 00:00:05 +09:00
|
|
|
.to include(
|
|
|
|
name: ':coolcat:',
|
|
|
|
type: 'Emoji'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|