DEV: attempt to stabilize flaky spec

Spec was checking implementation when it did not need to, temp file was blank
so optimized image should be blank
This commit is contained in:
Sam Saffron 2020-03-06 12:57:12 +11:00
parent 6fe91bbbbb
commit 494379201d
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 3 additions and 2 deletions

View File

@ -312,9 +312,10 @@ describe OptimizedImage do
end
end
context "when an error happened while generatign the thumbnail" do
context "when we have a bad file returned" do
it "returns nil" do
OptimizedImage.expects(:resize).returns(false)
# tempfile is empty
# this can not be resized
expect(OptimizedImage.create_for(s3_upload, 100, 200)).to eq(nil)
end
end