Add Zotero.DB.columnExists(table, column)
This commit is contained in:
parent
b0e065a4ae
commit
6bcc8af86b
2 changed files with 23 additions and 0 deletions
|
@ -341,4 +341,19 @@ describe("Zotero.DB", function() {
|
|||
assert.ok(callback2Ran);
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
describe("#columnExists()", function () {
|
||||
it("should return true if a column exists", async function () {
|
||||
assert.isTrue(await Zotero.DB.columnExists('items', 'itemID'));
|
||||
});
|
||||
|
||||
it("should return false if a column doesn't exists", async function () {
|
||||
assert.isFalse(await Zotero.DB.columnExists('items', 'foo'));
|
||||
});
|
||||
|
||||
it("should return false if a table doesn't exists", async function () {
|
||||
assert.isFalse(await Zotero.DB.columnExists('foo', 'itemID'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue