Skip to content

Commit

Permalink
Test for no-retry
Browse files Browse the repository at this point in the history
  • Loading branch information
kennsippell committed Feb 11, 2024
1 parent 631b617 commit 2712be2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/services/upload-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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',
Expand Down

0 comments on commit 2712be2

Please sign in to comment.