Clean up DataObject erasing, and fix search unloading

This commit is contained in:
Dan Stillman 2015-06-16 19:50:25 -04:00
parent 4f155e3432
commit 0d59bde186
5 changed files with 43 additions and 74 deletions

View file

@ -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* () {