Allow parentID in importFileAttachment() test support function

The Zotero.Attachments functions only take parentItemID, but
createDataObject() takes parentID.
This commit is contained in:
Dan Stillman 2017-08-30 17:23:38 -04:00
parent 94c4445475
commit 687f86af71

View file

@ -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);