Fix test for invalid id passed to DataObjects.getAsync()

This commit is contained in:
Dan Stillman 2017-01-17 04:18:39 -05:00
parent 33deefbf74
commit 2237c71dcb
2 changed files with 10 additions and 2 deletions

View file

@ -9,6 +9,14 @@ describe("Zotero.DataObjects", function () {
});
});
describe("#getAsync()", function () {
it("show throw if passed an invalid id", function* () {
var e = yield getPromiseError(Zotero.Items.getAsync("[Object]"));
assert.ok(e);
assert.include(e.message, '(string)');
});
});
describe("#getLibraryAndKeyFromID()", function () {
it("should return a libraryID and key within a transaction", function* () {
for (let type of types) {