From b927f5977a3cc254e1f6ddaa10416a8b222541f5 Mon Sep 17 00:00:00 2001 From: Richard Pentecost Date: Thu, 21 Jul 2022 11:25:51 +0100 Subject: [PATCH] add return when spying on deleteAdminUsersDetails --- .../admin-account-view/admin-account-view.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/features/admin/admin-users/admin-account-view/admin-account-view.component.spec.ts b/src/app/features/admin/admin-users/admin-account-view/admin-account-view.component.spec.ts index cbb00d4374..2656a13f2a 100644 --- a/src/app/features/admin/admin-users/admin-account-view/admin-account-view.component.spec.ts +++ b/src/app/features/admin/admin-users/admin-account-view/admin-account-view.component.spec.ts @@ -229,7 +229,7 @@ describe('AdminAccountViewComponent', () => { it('should call deleteAdminUserDetails with the the user id', async () => { const { component, fixture, getByText, adminUsersService } = await setup(); - const deleteAdminSpy = spyOn(adminUsersService, 'deleteAdminUserDetails'); + const deleteAdminSpy = spyOn(adminUsersService, 'deleteAdminUserDetails').and.returnValue(of({})); const deleteLink = getByText('Delete this admin user'); fireEvent.click(deleteLink); fixture.detectChanges();