From 1e1969a08913fc7f9ecd4b1566582d73f3469bf2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 22 Dec 2021 05:23:16 -0500 Subject: [PATCH] Fix `getBestAttachmentState()` tests after b0ba7e464 --- test/tests/itemTest.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/tests/itemTest.js b/test/tests/itemTest.js index fcfe0ac614..e052098efd 100644 --- a/test/tests/itemTest.js +++ b/test/tests/itemTest.js @@ -1147,7 +1147,10 @@ describe("Zotero.Item", function () { parentItemID: parentItem.id }); yield parentItem.getBestAttachmentState(); - assert.equal(parentItem.getBestAttachmentStateCached(), 1); + assert.deepEqual( + parentItem.getBestAttachmentStateCached(), + { type: 'other', exists: true } + ); }) it("should cache state for a missing file", function* () { @@ -1161,7 +1164,10 @@ describe("Zotero.Item", function () { let path = yield childItem.getFilePathAsync(); yield OS.File.remove(path); yield parentItem.getBestAttachmentState(); - assert.equal(parentItem.getBestAttachmentStateCached(), -1); + assert.deepEqual( + parentItem.getBestAttachmentStateCached(), + { type: 'other', exists: false } + ); }) })