Skip to content

A platform for community discussion. Free, open, simple.

DEV: attempt to stabilize flaky spec

Sam Saffron494379201d8e
diff --git a/spec/models/optimized_image_spec.rb b/spec/models/optimized_image_spec.rb
index a7c8e2e3521..e90029bec3c 100644
--- a/spec/models/optimized_image_spec.rb
+++ b/spec/models/optimized_image_spec.rb
@@ -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