From 2712be2517888d081138a520f83722bcfaa7a1b5 Mon Sep 17 00:00:00 2001 From: "kennsippell@gmail.com" Date: Sun, 11 Feb 2024 11:19:07 +0700 Subject: [PATCH] Test for no-retry --- test/services/upload-manager.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/services/upload-manager.spec.ts b/test/services/upload-manager.spec.ts index 4c5ffa59..0585826a 100644 --- a/test/services/upload-manager.spec.ts +++ b/test/services/upload-manager.spec.ts @@ -228,7 +228,7 @@ describe('upload-manager.ts', () => { const { remotePlace, sessionCache, chtApi } = await createMocks(); chtApi.createUser - .throws({ code: 'CERT_REJECTED', toString: () => 'upload-error' }) + .throws({ response: { status: 404 }, toString: () => 'upload-error' }) .onSecondCall().resolves(); const chu_name = 'new chu'; @@ -237,6 +237,7 @@ describe('upload-manager.ts', () => { const uploadManager = new UploadManager(); await uploadManager.doUpload(sessionCache.getPlaces(), chtApi); expect(chu.isCreated).to.be.false; + expect(chtApi.createUser.calledOnce).to.be.true; expect(chu.uploadError).to.include('upload-error'); expect(chu.creationDetails).to.deep.eq({ contactId: 'created-contact-id',