Skip to content

Commit

Permalink
Allow parentItemID as a createDataObject() parameter in tests
Browse files Browse the repository at this point in the history
Not just `parentID`
  • Loading branch information
dstillman committed Feb 3, 2018
1 parent 948a4dd commit ad216bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/content/support.js
Expand Up @@ -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());
}
Expand Down

0 comments on commit ad216bc

Please sign in to comment.