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

This commit is contained in:
Dan Stillman 2025-03-05 07:18:12 -05:00
parent 64b444752a
commit 85b97f82e6

View file

@ -1354,8 +1354,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);
}