Update collection cache after "Delete collection and items…"
Fixes #1314
This commit is contained in:
parent
5ec7c97f30
commit
c442daedce
2 changed files with 18 additions and 5 deletions
|
@ -53,6 +53,14 @@ describe("Zotero.Collection", function() {
|
|||
yield collection.eraseTx();
|
||||
assert.lengthOf(item.getCollections(), 0);
|
||||
});
|
||||
|
||||
it("should clear collection from item cache in deleteItems mode", function* () {
|
||||
var collection = yield createDataObject('collection');
|
||||
var item = yield createDataObject('item', { collections: [collection.id] });
|
||||
assert.lengthOf(item.getCollections(), 1);
|
||||
yield collection.eraseTx({ deleteItems: true });
|
||||
assert.lengthOf(item.getCollections(), 0);
|
||||
});
|
||||
})
|
||||
|
||||
describe("#version", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue