mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:52:11 +08:00
DEV: depend less on pngquant version (#26906)
This spec has been failing forever on my machine. I guess I have a "better" version of pngquant? --------- Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
parent
278eb0a1a5
commit
342328b622
|
@ -135,12 +135,12 @@ RSpec.describe UploadCreator do
|
|||
UploadCreator.new(file, filename, pasted: true, force_optimize: true).create_for(user.id)
|
||||
|
||||
# no optimisation possible without losing details
|
||||
expect(upload.filesize).to eq(9202)
|
||||
expect(upload.filesize).to be_between(1000, 9210)
|
||||
|
||||
thumbnail_size = upload.get_optimized_image(upload.width, upload.height, {}).filesize
|
||||
|
||||
# pngquant will lose some colors causing some extra size reduction
|
||||
expect(thumbnail_size).to be < 7500
|
||||
expect(thumbnail_size).to be_between(1000, 7500)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user