mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
Fix uploading higher-than-wide GIF profile picture with libvips enabled (#32911)
This commit is contained in:
@@ -2,13 +2,20 @@
|
||||
|
||||
RSpec.shared_examples 'AccountAvatar' do |fabricator|
|
||||
describe 'static avatars', :attachment_processing do
|
||||
describe 'when GIF' do
|
||||
describe 'with a square GIF' do
|
||||
it 'creates a png static style' do
|
||||
account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif'))
|
||||
expect(account.avatar_static_url).to_not eq account.avatar_original_url
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with a higher-than-wide GIF' do
|
||||
it 'creates a png static style' do
|
||||
account = Fabricate(fabricator, avatar: attachment_fixture('avatar-high.gif'))
|
||||
expect(account.avatar_static_url).to_not eq account.avatar_original_url
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when non-GIF' do
|
||||
it 'does not create extra static style' do
|
||||
account = Fabricate(fabricator, avatar: attachment_fixture('attachment.jpg'))
|
||||
|
||||
Reference in New Issue
Block a user