chore(api): add integration version of the status api. Closes #3981

This commit is contained in:
Gabe Kangas
2025-02-11 21:48:07 -08:00
parent 7b88b1099d
commit d4dec25129
6 changed files with 74 additions and 28 deletions

View File

@@ -68,11 +68,21 @@ test('create access token', async () => {
test('check access tokens', async () => {
const res = await getAdminResponse('accesstokens');
const tokenCheck = res.body.filter(
(token) => token.accessToken === accessToken
(token) => token.accessToken === accessToken,
);
expect(tokenCheck).toHaveLength(1);
});
test('test status request', async () => {
const res = await request
.get('/api/integrations/status')
.set('Authorization', 'Bearer ' + accessToken)
.expect(200);
expect(res.body).toHaveProperty('online');
expect(res.body).toHaveProperty('versionNumber');
});
test('send a system message using access token', async () => {
const payload = {
body: 'This is a test system message from the automated integration test',
@@ -147,7 +157,7 @@ test('delete access token', async () => {
test('check token delete was successful', async () => {
const res = await getAdminResponse('accesstokens');
const tokenCheck = res.body.filter(
(token) => token.accessToken === accessToken
(token) => token.accessToken === accessToken,
);
expect(tokenCheck).toHaveLength(0);
});