Skip to content

Commit

Permalink
Fix test regression
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Apr 4, 2024
1 parent 3cde9e9 commit 62dc594
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,10 @@ export const locationInventoryList = {
],
};

export const AllInventoryList = {
export const allInventoryList = {
resourceType: 'List',
id: 'list-resource-id',
identifier: [
{
use: 'official',
value: 'list-resource-id',
},
],
identifier: [{ use: 'official', value: 'list-resource-id' }],
status: 'current',
code: {
coding: [
Expand All @@ -251,7 +246,10 @@ export const AllInventoryList = {
},
mode: 'working',
title: 'Supply Chain commodities',
entry: [],
entry: [
{ item: { reference: 'Group/67bb848e-f049-41f4-9c75-3b726664db67' } },
{ item: { reference: 'List/67bb848e-f049-41f4-9c75-3b726664db67' } },
],
};

export const productsList = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
formValues,
locationResourcePayload,
locationInventoryList,
AllInventoryList,
allInventoryList,
productsList,
unicefDonorsValueSet,
unicefSectionValueSet,
Expand Down Expand Up @@ -166,8 +166,10 @@ test('creates new inventory as expected', async () => {
.reply(201, locationInventoryList)
.get(`/List/${listResourceId}`)
.reply(404, { message: 'Not found' })
.put(`/List/${listResourceId}`, AllInventoryList)
.reply(201, AllInventoryList)
.put(`/List/${listResourceId}`, { ...allInventoryList, entry: [] })
.reply(201, { ...allInventoryList, entry: [] })
.put(`/List/${listResourceId}`, allInventoryList)
.reply(201, allInventoryList)
.persist();

const successNoticeMock = jest
Expand Down

0 comments on commit 62dc594

Please sign in to comment.