Add Zotero.Library.prototype.libraryTypeID

Get the library-type-specific id for the library (e.g., userID for user
library, groupID for group library)
This commit is contained in:
Dan Stillman 2015-09-22 00:53:38 -04:00
parent 4b83d157b9
commit 691819bd32
2 changed files with 31 additions and 1 deletions

View file

@ -34,6 +34,14 @@ describe("Zotero.Library", function() {
});
});
describe("#libraryTypeID", function () {
it("should return a group id for a group", function* () {
let library = yield createGroup();
assert.typeOf(library.libraryTypeID, 'number');
assert.equal(library.libraryTypeID, library.groupID);
})
})
describe("#libraryVersion", function() {
it("should be settable to increasing values", function() {
let library = new Zotero.Library();