Skip to content

Commit

Permalink
More endpoint tests
Browse files Browse the repository at this point in the history
  • Loading branch information
catastrophe-brandon committed Dec 2, 2024
1 parent 436a7cf commit f55ed0c
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import { EndpointResourceV1DeleteEventTypeFromEndpointParams } from '../../Endpo
import { EndpointResourceV1DeleteEndpointParams } from '../../EndpointResourceV1DeleteEndpoint';
import { EndpointResourceV1EnableEndpointParams } from '../../EndpointResourceV1EnableEndpoint';
import { EndpointResourceV1DisableEndpointParams } from '../../EndpointResourceV1DisableEndpoint';
import { EndpointResourceV1GetEndpointParams } from '../../EndpointResourceV1GetEndpoint';
import { EndpointResourceV1GetEndpointHistoryParams } from '../../EndpointResourceV1GetEndpointHistory';

// note the 1.0, which is different from, for example. RBAC v1
// note the 1.0, which is different from, for example, RBAC v1
const BASE_PATH = 'http://localhost:3001/api/integrations/v1.0/';

const client = IntegrationsClient(BASE_PATH);
Expand Down Expand Up @@ -77,4 +79,18 @@ describe('Integrations API (v1)', () => {
const disableResp = await client.endpointResourceV1DisableEndpoint(disableEndpointParams);
expect(disableResp.status).toEqual(204);
});

test('get endpoint', async () => {
const getEndpointParams: EndpointResourceV1GetEndpointParams = {
id: JEFF,
};
const getEndptResp = await client.endpointResourceV1GetEndpoint(getEndpointParams);
expect(getEndptResp.status).toEqual(200);
});

test('get endpoint history', async () => {
const getEndpointHistoryParams: EndpointResourceV1GetEndpointHistoryParams = { id: JEFF };
const endpointHistoryResp = await client.endpointResourceV1GetEndpointHistory(getEndpointHistoryParams);
expect(endpointHistoryResp.status).toEqual(200);
});
});

0 comments on commit f55ed0c

Please sign in to comment.