entity_cache_spec.rb 604 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe EntityCache do
  4. let(:local_account) { Fabricate(:account, domain: nil, username: 'alice') }
  5. let(:remote_account) { Fabricate(:account, domain: 'remote.test', username: 'bob', url: 'https://remote.test/') }
  6. describe '#emoji' do
  7. subject { described_class.instance.emoji(shortcodes, domain) }
  8. context 'when called with an empty list of shortcodes' do
  9. let(:shortcodes) { [] }
  10. let(:domain) { 'example.org' }
  11. it 'returns an empty array' do
  12. expect(subject).to eq []
  13. end
  14. end
  15. end
  16. end