Skip to content

Commit

Permalink
Check database values in Zotero.Library#editable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Feb 24, 2017
1 parent b21729e commit 74d1cc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/tests/libraryTest.js
Expand Up @@ -73,11 +73,13 @@ describe("Zotero.Library", function() {

assert.isTrue(library.editable);
assert.isTrue(Zotero.Libraries.isEditable(library.libraryID), "sets editable in cache to true");
assert.equal((yield Zotero.DB.valueQueryAsync("SELECT editable FROM libraries WHERE libraryID=?", library.libraryID)), 1)

library.editable = false;
yield library.saveTx();
assert.isFalse(library.editable);
assert.isFalse(Zotero.Libraries.isEditable(library.libraryID), "sets editable in cache to false");
assert.equal((yield Zotero.DB.valueQueryAsync("SELECT editable FROM libraries WHERE libraryID=?", library.libraryID)), 0)
});
it("should not be settable for user and publications libraries", function* () {
let library = Zotero.Libraries.get(Zotero.Libraries.userLibraryID);
Expand Down

0 comments on commit 74d1cc1

Please sign in to comment.