Skip to content

Commit 5d4a90b

Browse files
committed
fix tests
1 parent 44c74ee commit 5d4a90b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/unit/entraInviteUser.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ describe("Test Microsoft Entra ID user invitation", () => {
4949
.send({
5050
emails: ["[email protected]"],
5151
});
52-
expect(response.statusCode).toBe(500);
52+
expect(response.statusCode).toBe(202);
53+
expect(response.body.success.length).toEqual(0);
54+
expect(response.body.failure.length).toEqual(1);
5355
expect(getEntraIdToken).toHaveBeenCalled();
5456
expect(addToTenant).toHaveBeenCalled();
5557
});
@@ -66,7 +68,7 @@ describe("Test Microsoft Entra ID user invitation", () => {
6668
.send({
6769
emails: ["[email protected]"],
6870
});
69-
expect(response.statusCode).toBe(201);
71+
expect(response.statusCode).toBe(202);
7072
expect(getEntraIdToken).toHaveBeenCalled();
7173
expect(addToTenant).toHaveBeenCalled();
7274
});
@@ -83,7 +85,7 @@ describe("Test Microsoft Entra ID user invitation", () => {
8385
.send({
8486
emails: ["[email protected]"],
8587
});
86-
expect(response.statusCode).toBe(201);
88+
expect(response.statusCode).toBe(202);
8789
expect(getEntraIdToken).toHaveBeenCalled();
8890
expect(addToTenant).toHaveBeenCalled();
8991
});

0 commit comments

Comments
 (0)