feat: Implement test connection API endpoint

This commit is contained in:
Faruk AYDIN
2024-03-29 23:45:21 +01:00
parent 26f31a5899
commit 8e646c244e
6 changed files with 170 additions and 3 deletions

View File

@@ -85,16 +85,16 @@ describe('GET /api/v1/apps/:appKey/connections', () => {
expect(response.body).toEqual(expectedPayload);
});
it('should return not found response for invalid app key', async () => {
it('should return not found response for invalid connection UUID', async () => {
await createPermission({
action: 'read',
action: 'update',
subject: 'Connection',
roleId: currentUserRole.id,
conditions: ['isCreator'],
});
await request(app)
.get('/api/v1/apps/invalid-app-key/connections')
.get('/api/v1/connections/invalid-connection-id/connections')
.set('Authorization', token)
.expect(404);
});