Add unit tests for bulk device approval method

This commit is contained in:
Rui Tome 2024-05-03 16:00:15 +01:00
parent 8547b6626f
commit 0f56f8aedc
No known key found for this signature in database
GPG Key ID: 526239D96A8EC066
1 changed files with 18 additions and 0 deletions

View File

@ -92,6 +92,24 @@ describe("OrganizationAuthRequestService", () => {
});
});
describe("approvePendingRequests", () => {
it("should approve the specified pending auth requests", async () => {
jest.spyOn(organizationAuthRequestApiService, "approvePendingRequests");
await organizationAuthRequestService.approvePendingRequests(
"organizationId",
"requestId1",
"requestId2",
);
expect(organizationAuthRequestApiService.approvePendingRequests).toHaveBeenCalledWith(
"organizationId",
"requestId1",
"requestId2",
);
});
});
describe("approvePendingRequest", () => {
it("should approve the specified pending auth request", async () => {
jest.spyOn(organizationAuthRequestApiService, "approvePendingRequest");