DEV: Remove flaky secure optimized image spec

This commit is contained in:
Martin Brennan 2020-08-04 16:29:41 +10:00
parent 3b08b15855
commit 1f7b44de67
No known key found for this signature in database
GPG Key ID: A08063EEF3EA26A4
1 changed files with 0 additions and 20 deletions

View File

@ -343,26 +343,6 @@ describe OptimizedImage do
expect(oi.filesize).to be > 0 expect(oi.filesize).to be > 0
end end
end end
context "secure uploads enabled" do
it "allows to recalculate the filesize" do
SiteSetting.secure_media = true
s3_upload = Fabricate(:secure_upload_s3)
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/")
stub_request(:get, Discourse.store.signed_url_for_path(s3_upload.url)).to_return(status: 200, body: file_from_fixtures("logo.png"))
stub_request(:put, "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/optimized/1X/#{s3_upload.sha1}_2_100x200.png")
.to_return(status: 200, headers: { "ETag" => "someetag" })
oi = OptimizedImage.create_for(s3_upload, 100, 200)
oi.filesize = nil
stub_request(:get, Discourse.store.signed_url_for_path(oi.url))
.to_return(status: 200, body: file_from_fixtures("resized.png"))
expect(oi.filesize).to be > 0
end
end
end end
end end
end end