fix postgres quotes & fixed test.json

This commit is contained in:
Michael C
2021-12-31 17:12:46 -05:00
parent a42f023074
commit 05516a5d7d
2 changed files with 4 additions and 8 deletions

View File

@@ -12,10 +12,6 @@
"behindProxy": true,
"db": ":memory:",
"privateDB": ":memory:",
"redis": {
"host": "localhost",
"port": 6379
},
"createDatabaseIfNotExist": true,
"schemaFolder": "./databases",
"dbSchema": "./databases/_sponsorTimes.db.sql",

View File

@@ -83,8 +83,8 @@ describe("tempVIP test", function() {
assert.ok(!result);
})
.then(async () => {
const row = await privateDB.prepare("get", "SELECT * FROM tempVipLog WHERE targetUserID = ?", [publicTempVIPOne]);
assert.ok(!row?.length);
const row = await privateDB.prepare("get", `SELECT * FROM "tempVipLog" WHERE "targetUserID" = ?`, [publicTempVIPOne]);
assert.ok(!row?.enabled);
done();
})
.catch(err => done(err));
@@ -108,8 +108,8 @@ describe("tempVIP test", function() {
assert.strictEqual(vip, "ChannelID");
assert.strictEqual(res.data, "Temp VIP added on channel ChannelAuthor");
// check privateDB
const row = await privateDB.prepare("get", "SELECT * FROM tempVipLog WHERE targetUserID = ?", [publicTempVIPOne]);
assert.ok(row);
const row = await privateDB.prepare("get", `SELECT * FROM "tempVipLog" WHERE "targetUserID" = ?`, [publicTempVIPOne]);
assert.ok(row.enabled);
done();
})
.catch(err => done(err));