mirror of
https://github.com/thelounge/thelounge
synced 2024-11-21 19:43:07 +00:00
sqlite: don't hardcode version test
This commit is contained in:
parent
25642fbe98
commit
063aca948c
2 changed files with 3 additions and 6 deletions
|
@ -23,7 +23,7 @@ try {
|
|||
);
|
||||
}
|
||||
|
||||
const currentSchemaVersion = 1520239200;
|
||||
export const currentSchemaVersion = 1520239200;
|
||||
|
||||
const schema = [
|
||||
// Schema version #1
|
||||
|
|
|
@ -5,7 +5,7 @@ import {expect} from "chai";
|
|||
import util from "../util";
|
||||
import Msg, {MessageType} from "../../server/models/msg";
|
||||
import Config from "../../server/config";
|
||||
import MessageStorage from "../../server/plugins/messageStorage/sqlite";
|
||||
import MessageStorage, {currentSchemaVersion} from "../../server/plugins/messageStorage/sqlite";
|
||||
|
||||
describe("SQLite Message Storage", function () {
|
||||
// Increase timeout due to unpredictable I/O on CI services
|
||||
|
@ -53,11 +53,8 @@ describe("SQLite Message Storage", function () {
|
|||
"SELECT value FROM options WHERE name = 'schema_version'",
|
||||
(err, row) => {
|
||||
expect(err).to.be.null;
|
||||
|
||||
// Should be sqlite.currentSchemaVersion,
|
||||
// compared as string because it's returned as such from the database
|
||||
expect(row.value).to.equal("1520239200");
|
||||
|
||||
expect(row.value).to.equal(currentSchemaVersion.toString());
|
||||
done();
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue