Skip to content

Commit

Permalink
fix test case issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspalsingh-aot committed Apr 3, 2024
1 parent 7294afd commit ec4b387
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('KeycloakService', () => {
// Assert
expect(axios.put).toHaveBeenCalledTimes(1); // Ensure axios.put is called
expect(axios.put).toHaveBeenCalledWith(
expect.stringContaining(`https://epd-keycloak-dev.apps.silver.devops.gov.bc.ca/auth/admin/realms/forms-flow-ai/users/${userId}/groups/${groupId}`),
expect.stringContaining(`/admin/realms/forms-flow-ai/users/${userId}/groups/${groupId}`),
{}, // Empty object for the request body
{
headers: {
Expand All @@ -150,7 +150,7 @@ describe('KeycloakService', () => {
await expect(keycloakService.addUserToGroup(userId, groupId, accessToken)).rejects.toThrowError(errorMessage);

// Ensure axios.put is called
expect(axios.put).toHaveBeenCalledTimes(2);
expect(axios.put).toHaveBeenCalledTimes(1);
});
});

Expand Down

0 comments on commit ec4b387

Please sign in to comment.