Clean up DataObject erasing, and fix search unloading
This commit is contained in:
parent
4f155e3432
commit
0d59bde186
5 changed files with 43 additions and 74 deletions
|
@ -42,7 +42,19 @@ describe("Zotero.DataObjects", function () {
|
|||
assert.isFalse(libraryKey);
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
describe("#exists()", function () {
|
||||
it("should return false after object is deleted", function* () {
|
||||
for (let type of types) {
|
||||
let objectsClass = Zotero.DataObjectUtilities.getObjectsClassForObjectType(type);
|
||||
let obj = yield createDataObject(type);
|
||||
let id = obj.id;
|
||||
yield obj.eraseTx();
|
||||
assert.isFalse(objectsClass.exists(id), type + " does not exist");
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe("#_setIdentifier", function () {
|
||||
it("should not allow an id change", function* () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue