Remove obsolete Zotero.Libraries.isFilesEditable test after 88184b341

This commit is contained in:
Dan Stillman 2017-02-24 03:29:50 -05:00
parent 0a1629e986
commit 3ba2b40c4c
2 changed files with 9 additions and 33 deletions

View file

@ -102,6 +102,14 @@ describe("Zotero.Library", function() {
});
describe("#filesEditable", function() {
it("should always return true for user library", function() {
assert.isTrue(Zotero.Libraries.userLibrary.filesEditable);
});
it("should always return true for publications library", function() {
assert.isTrue(Zotero.Libraries.get(Zotero.Libraries.publicationsLibraryID).filesEditable);
});
it("should return files editable status", function() {
let library = Zotero.Libraries.get(Zotero.Libraries.userLibraryID);
assert.isTrue(library.filesEditable, 'user library is files editable');
@ -118,6 +126,7 @@ describe("Zotero.Library", function() {
assert.isFalse(library.filesEditable);
assert.isFalse(Zotero.Libraries.isFilesEditable(library.libraryID), "sets files editable in cache to false");
});
it("should not be settable for user and publications libraries", function* () {
let library = Zotero.Libraries.get(Zotero.Libraries.userLibraryID);
assert.throws(function() {library.filesEditable = false}, /^Cannot change _libraryFilesEditable for user library$/, "does not allow setting user library as not files editable");