From 74d1cc193a69bb33fc259b695c373a2351ffeca7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 24 Feb 2017 00:09:13 -0500 Subject: [PATCH] Check database values in Zotero.Library#editable tests --- test/tests/libraryTest.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/tests/libraryTest.js b/test/tests/libraryTest.js index 193641c45..5c2f91810 100644 --- a/test/tests/libraryTest.js +++ b/test/tests/libraryTest.js @@ -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);