chore(api): add integration version of the status api. Closes #3981
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user