From 687f86af714f1289699030a14d6eb716a22bcf71 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 30 Aug 2017 17:23:38 -0400 Subject: [PATCH] Allow parentID in importFileAttachment() test support function The Zotero.Attachments functions only take parentItemID, but createDataObject() takes parentID. --- test/content/support.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/content/support.js b/test/content/support.js index 10a4e752b2..a804a9e29d 100644 --- a/test/content/support.js +++ b/test/content/support.js @@ -844,7 +844,8 @@ function importFileAttachment(filename, options = {}) { let file = getTestDataDirectory(); filename.split('/').forEach((part) => file.append(part)); let importOptions = { - file + file, + parentItemID: options.parentID }; Object.assign(importOptions, options); return Zotero.Attachments.importFromFile(importOptions);