mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 13:37:01 +03:00
fix postgres quotes & fixed test.json
This commit is contained in:
@@ -12,10 +12,6 @@
|
|||||||
"behindProxy": true,
|
"behindProxy": true,
|
||||||
"db": ":memory:",
|
"db": ":memory:",
|
||||||
"privateDB": ":memory:",
|
"privateDB": ":memory:",
|
||||||
"redis": {
|
|
||||||
"host": "localhost",
|
|
||||||
"port": 6379
|
|
||||||
},
|
|
||||||
"createDatabaseIfNotExist": true,
|
"createDatabaseIfNotExist": true,
|
||||||
"schemaFolder": "./databases",
|
"schemaFolder": "./databases",
|
||||||
"dbSchema": "./databases/_sponsorTimes.db.sql",
|
"dbSchema": "./databases/_sponsorTimes.db.sql",
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ describe("tempVIP test", function() {
|
|||||||
assert.ok(!result);
|
assert.ok(!result);
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const row = await privateDB.prepare("get", "SELECT * FROM tempVipLog WHERE targetUserID = ?", [publicTempVIPOne]);
|
const row = await privateDB.prepare("get", `SELECT * FROM "tempVipLog" WHERE "targetUserID" = ?`, [publicTempVIPOne]);
|
||||||
assert.ok(!row?.length);
|
assert.ok(!row?.enabled);
|
||||||
done();
|
done();
|
||||||
})
|
})
|
||||||
.catch(err => done(err));
|
.catch(err => done(err));
|
||||||
@@ -108,8 +108,8 @@ describe("tempVIP test", function() {
|
|||||||
assert.strictEqual(vip, "ChannelID");
|
assert.strictEqual(vip, "ChannelID");
|
||||||
assert.strictEqual(res.data, "Temp VIP added on channel ChannelAuthor");
|
assert.strictEqual(res.data, "Temp VIP added on channel ChannelAuthor");
|
||||||
// check privateDB
|
// check privateDB
|
||||||
const row = await privateDB.prepare("get", "SELECT * FROM tempVipLog WHERE targetUserID = ?", [publicTempVIPOne]);
|
const row = await privateDB.prepare("get", `SELECT * FROM "tempVipLog" WHERE "targetUserID" = ?`, [publicTempVIPOne]);
|
||||||
assert.ok(row);
|
assert.ok(row.enabled);
|
||||||
done();
|
done();
|
||||||
})
|
})
|
||||||
.catch(err => done(err));
|
.catch(err => done(err));
|
||||||
|
|||||||
Reference in New Issue
Block a user