logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

account_avatar.rb (629B)


  1. # frozen_string_literal: true
  2. shared_examples 'AccountAvatar' do |fabricator|
  3. describe 'static avatars' do
  4. describe 'when GIF' do
  5. it 'creates a png static style' do
  6. account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif'))
  7. expect(account.avatar_static_url).to_not eq account.avatar_original_url
  8. end
  9. end
  10. describe 'when non-GIF' do
  11. it 'does not create extra static style' do
  12. account = Fabricate(fabricator, avatar: attachment_fixture('attachment.jpg'))
  13. expect(account.avatar_static_url).to eq account.avatar_original_url
  14. end
  15. end
  16. end
  17. end