mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
DEV: Fix png optimization test flakyness (#19535)
* DEV: Fix png optimization test flakyness Update fixture with oxipng 7 This test broke when the pngoptimizer got better so the pre-optimized png in the fixtures was compressed further on upload creation, breaking the expected size.
This commit is contained in:

committed by
GitHub

parent
318ebdf7e0
commit
06ff15f3ae
BIN
spec/fixtures/images/pngquant.png
vendored
BIN
spec/fixtures/images/pngquant.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.0 KiB |
@ -139,7 +139,7 @@ RSpec.describe UploadCreator do
|
|||||||
).create_for(user.id)
|
).create_for(user.id)
|
||||||
|
|
||||||
# no optimisation possible without losing details
|
# no optimisation possible without losing details
|
||||||
expect(upload.filesize).to eq(9558)
|
expect(upload.filesize).to eq(9202)
|
||||||
|
|
||||||
thumbnail_size = upload.get_optimized_image(upload.width, upload.height, {}).filesize
|
thumbnail_size = upload.get_optimized_image(upload.width, upload.height, {}).filesize
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user