Implement library.isGroup property, which was never properly implemented
And since `Zotero.Libraries.isGroupLibrary()` just checked that property, that hasn't worked either since `isGroup` was added in 2015. There's no test for `.isGroup`, and the test for `isGroupLibrary()` used `if()` instead of `it()`, so it never actually ran. Also: - Remove old code block in search.js that called `isGroupLibrary()`. Since `isGroupLibrary()` didn't work, this block was unused, and its logic was previously added elsewhere.
This commit is contained in:
parent
689da34094
commit
fb01339c6b
3 changed files with 9 additions and 7 deletions
|
@ -187,9 +187,11 @@ describe("Zotero.Libraries", function() {
|
|||
assert.isFalse(Zotero.Libraries.isGroupLibrary(id), "returns false for " + type + " library");
|
||||
}
|
||||
});
|
||||
if("should return true for group library", function(){
|
||||
|
||||
it("should return true for group library", function () {
|
||||
assert.isTrue(Zotero.Libraries.isGroupLibrary(group.libraryID));
|
||||
})
|
||||
|
||||
it("should throw for invalid library ID", function() {
|
||||
assert.throws(Zotero.Libraries.isGroupLibrary.bind(Zotero.Libraries, -1), /^Invalid library ID /);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue