X-Git-Url: http://git.squeep.com/?p=websub-hub;a=blobdiff_plain;f=test%2Fsrc%2Fdb%2Fintegration.js;h=b92202d41b0e30a04e759872ee984e756f95a13c;hp=83feac761222a620793cb6963b9a2604e3fb60f5;hb=737fbd003d5c4dfea81b667ef906f1c106a60612;hpb=17b4ff9c1974842c02071d2cd02144d2e5a99eb5 diff --git a/test/src/db/integration.js b/test/src/db/integration.js index 83feac7..b92202d 100644 --- a/test/src/db/integration.js +++ b/test/src/db/integration.js @@ -79,6 +79,11 @@ describe('Database Integration', function () { assert(db); }); + it('is healthy', async function () { + const result = await db.healthCheck(); + assert(result); + }); + describe('Authentication', function () { let identifier, credential; beforeEach(function () { @@ -220,6 +225,14 @@ describe('Database Integration', function () { assert.strictEqual(Number(topic.contentFetchAttemptsSinceSuccess), 0); }); }); + step('gets publish history', async function () { + await db.context(async (dbCtx) => { + const result = (await db.topicPublishHistory(dbCtx, topicId, 7)) + .map((x) => Number(x)); + const expected = [1, 0, 0, 0, 0, 0, 0]; + assert.deepStrictEqual(result, expected); + }); + }); step('deletes a topic', async function () { await db.context(async (dbCtx) => { const result = await db.topicSet(dbCtx, testData.anotherTopicSet);