Merge pull request #1 from Joe-Dowd/testing-custom-webhooks

make tests hit webhook code
This commit is contained in:
Epic
2020-08-24 23:06:55 +02:00
committed by GitHub
2 changed files with 14 additions and 1 deletions

View File

@@ -16,5 +16,12 @@
"privateDBSchema": "./databases/_private.db.sql",
"mode": "test",
"readOnly": false,
"webhooks": []
"webhooks": [{
"url": "http://127.0.0.1:8081/CustomWebhook",
"key": "superSecretKey",
"scopes": [
"vote.up",
"vote.down"
]
}]
}

View File

@@ -15,6 +15,12 @@ app.post('/CompletelyIncorrectReportWebhook', (req, res) => {
res.sendStatus(200);
});
app.post('/CustomWebhook', (req, res) => {
res.sendStatus(200);
});
module.exports = function createMockServer(callback) {
return app.listen(config.mockPort, callback);
}