Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
kennsippell committed May 22, 2024
1 parent 3dc09b5 commit c591f6b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/services/upload-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,19 +325,17 @@ describe('services/upload-manager.ts', () => {
});

it('#173 - replacement when place has no primary contact', async () => {
const { remotePlace, sessionCache, contactType, fakeFormData, chtApi } = await createMocks();
const toReplace: RemotePlace = {
id: 'id-replace',
const { subcounty, sessionCache, contactType, fakeFormData, chtApi } = await createMocks();
const toReplace: ChtDoc = {
_id: 'id-replace',
name: 'to-replace',
lineage: [remotePlace.id],
type: 'remote',
};

chtApi.updatePlace.resolves({ _id: 'updated-place-id' });
fakeFormData.hierarchy_replacement = toReplace.name;

chtApi.getPlacesWithType
.resolves([remotePlace])
.resolves([subcounty])
.onSecondCall()
.resolves([toReplace]);

Expand Down

0 comments on commit c591f6b

Please sign in to comment.