Fix trashing of descendant items when deleting a collection
Also allows 'collections' property to be passed to createDataObject()/createUnsavedDataObject() in tests.
This commit is contained in:
parent
a80f130997
commit
e873617890
9 changed files with 72 additions and 32 deletions
|
@ -319,6 +319,9 @@ function createUnsavedDataObject(objectType, params = {}) {
|
|||
if (params.title !== undefined || params.setTitle) {
|
||||
obj.setField('title', params.title !== undefined ? params.title : Zotero.Utilities.randomString());
|
||||
}
|
||||
if (params.collections !== undefined) {
|
||||
obj.setCollections(params.collections);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'collection':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue