commit ad216bcf97327800c48c9c433dcf5acf83ba821e
parent 948a4dda64e995398afee7e0796c03f0db332ff9
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 3 Feb 2018 04:14:33 -0500
Allow `parentItemID` as a `createDataObject()` parameter in tests
Not just `parentID`
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/test/content/support.js b/test/content/support.js
@@ -411,6 +411,10 @@ function createUnsavedDataObject(objectType, params = {}) {
switch (objectType) {
case 'item':
case 'feedItem':
+ if (params.parentItemID) {
+ params.parentID = params.parentItemID;
+ delete params.parentItemID;
+ }
if (params.title !== undefined || params.setTitle) {
obj.setField('title', params.title !== undefined ? params.title : Zotero.Utilities.randomString());
}