Fix /connector/saveSnapshot test for Zotero.HTTP.download()

This commit is contained in:
Dan Stillman 2025-03-05 07:18:12 -05:00
parent 6add721e68
commit 8021ca0a0b

View file

@ -1353,8 +1353,8 @@ describe("Connector Server", function () {
var origRequest = Zotero.HTTP.request.bind(Zotero.HTTP);
var called = 0;
var stub = sinon.stub(Zotero.HTTP, 'request').callsFake(function (method, url, options) {
// Forward saveSnapshot request
if (url.endsWith('saveSnapshot')) {
// Forward saveSnapshot and PDF requests
if (url.endsWith('saveSnapshot') || url.endsWith('test.pdf')) {
return origRequest(...arguments);
}