mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:13:25 +08:00
improve test, also ensure no zero size is generated
This commit is contained in:
@ -47,7 +47,9 @@ describe OptimizedImage do
|
|||||||
filename: "test.png"
|
filename: "test.png"
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(orig_size).to be > File.size(original_path)
|
new_size = File.size(original_path)
|
||||||
|
expect(orig_size).to be > new_size
|
||||||
|
expect(new_size).not_to eq(0)
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
File.delete(original_path) if File.exists?(original_path)
|
File.delete(original_path) if File.exists?(original_path)
|
||||||
|
Reference in New Issue
Block a user