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.

19 lines
629 B

  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