Phase 5 cleanup
This commit is contained in:
parent
5536acd67d
commit
76a516a417
136 changed files with 6322 additions and 1985 deletions
|
|
@ -12,8 +12,14 @@ vi.mock('../api-client', () => ({
|
|||
}));
|
||||
|
||||
import {
|
||||
listCabinetItems, getCabinetItem, getCabinetSummary, getExpiringSoon,
|
||||
createCabinetItem, updateCabinetItem, adjustCabinetItemQuantity, deleteCabinetItem,
|
||||
listCabinetItems,
|
||||
getCabinetItem,
|
||||
getCabinetSummary,
|
||||
getExpiringSoon,
|
||||
createCabinetItem,
|
||||
updateCabinetItem,
|
||||
adjustCabinetItemQuantity,
|
||||
deleteCabinetItem,
|
||||
} from '../cabinet';
|
||||
|
||||
beforeEach(() => vi.clearAllMocks());
|
||||
|
|
@ -80,7 +86,10 @@ describe('cabinet service', () => {
|
|||
it('adjustCabinetItemQuantity calls POST', async () => {
|
||||
mockPost.mockResolvedValue({ _id: 'ci-1' });
|
||||
await adjustCabinetItemQuantity('hh1', 'ci-1', { adjustment: -5, reason: 'used' } as never);
|
||||
expect(mockPost).toHaveBeenCalledWith('/households/hh1/cabinet/ci-1/adjust', { adjustment: -5, reason: 'used' });
|
||||
expect(mockPost).toHaveBeenCalledWith('/households/hh1/cabinet/ci-1/adjust', {
|
||||
adjustment: -5,
|
||||
reason: 'used',
|
||||
});
|
||||
});
|
||||
|
||||
it('deleteCabinetItem calls DELETE', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue