From ae8e3b1ac700a21bbb9984e248a66afda6913e8d Mon Sep 17 00:00:00 2001 From: crisnicandrei <62384997+crisnicandrei@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:58:38 +0300 Subject: [PATCH] lint --- .../glam-pending-archives.component.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts index 65666541d..68ad9a883 100644 --- a/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts +++ b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts @@ -73,6 +73,7 @@ describe('GlamPendingArchivesComponent', () => { expect(outputs.nextOutput.emit).toHaveBeenCalledWith(selectedArchive); }); + it('should call api.archive.accept when selectArchive is called', async () => { const { instance, inject } = await shallow.render(); const apiService = inject(ApiService); @@ -84,6 +85,7 @@ describe('GlamPendingArchivesComponent', () => { }); await instance.selectArchive(archive); + expect(apiService.archive.accept).toHaveBeenCalledWith(archive); }); @@ -95,6 +97,7 @@ describe('GlamPendingArchivesComponent', () => { }); await instance.selectArchive(archive); + expect(instance.acceptedArchives.length).toBe(1); expect(instance.acceptedArchives[0].archiveId).toBe(1); }); @@ -108,6 +111,7 @@ describe('GlamPendingArchivesComponent', () => { expect(instance.selectedArchive).toBeNull(); await instance.selectArchive(archive); + expect(instance.selectedArchive.archiveId).toBe(archive.archiveId); }); @@ -119,6 +123,7 @@ describe('GlamPendingArchivesComponent', () => { }); await instance.selectArchive(archive); + expect(instance.isSelected(1)).toBeTrue(); });