Add test for 4.0 → 5.0 DB upgrade
With a mechanism for specifying a zipped DB copy to use as the initial DB when resetting the DB in tests
This commit is contained in:
parent
0f96c20f3c
commit
eac98d1c2e
3 changed files with 33 additions and 2 deletions
|
@ -303,4 +303,24 @@ describe("Zotero.Schema", function() {
|
|||
await assert.isTrue(await Zotero.Schema.integrityCheck());
|
||||
});
|
||||
})
|
||||
|
||||
describe("Database Upgrades", function () {
|
||||
after(async function () {
|
||||
await resetDB({
|
||||
thisArg: this,
|
||||
skipBundledFiles: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("should upgrade 4.0 database", async function () {
|
||||
await resetDB({
|
||||
thisArg: this,
|
||||
skipBundledFiles: true,
|
||||
dbFile: OS.Path.join(getTestDataDirectory().path, 'zotero-4.0.sqlite.zip')
|
||||
});
|
||||
// Make sure we can open the Zotero pane without errors
|
||||
win = await loadZoteroPane();
|
||||
win.close();
|
||||
});
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue