Allow parentItemID as a createDataObject() parameter in tests

Not just `parentID`

(cherry picked from commit ad216bcf97)
This commit is contained in:
Dan Stillman 2018-02-03 04:14:33 -05:00
parent 5dbae77c98
commit 410976f991

View File

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