Add auditLines field to new stock audit level creation and mock stock audit module in tests
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This commit is contained in:
parent
3bd1549c85
commit
e1ac5bfba1
@ -23,6 +23,10 @@ jest.unstable_mockModule('../../utils.js', () => ({
|
|||||||
generateId: jest.fn(() => () => 'test-id'),
|
generateId: jest.fn(() => () => 'test-id'),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
jest.unstable_mockModule('../inventory/stockaudit.schema.js', () => ({
|
||||||
|
updateDraftStockAuditCurrents: jest.fn().mockResolvedValue(),
|
||||||
|
}));
|
||||||
|
|
||||||
const { aggregateRollups, editObject, newObject, deleteObject } = await import('../../database.js');
|
const { aggregateRollups, editObject, newObject, deleteObject } = await import('../../database.js');
|
||||||
const { listingModel } = await import('../sales/listing.schema.js');
|
const { listingModel } = await import('../sales/listing.schema.js');
|
||||||
const { listingVarientModel } = await import('../sales/listingvarient.schema.js');
|
const { listingVarientModel } = await import('../sales/listingvarient.schema.js');
|
||||||
|
|||||||
@ -151,6 +151,7 @@ export const newStockAuditLevelRouteHandler = async (req, res) => {
|
|||||||
const newData = {
|
const newData = {
|
||||||
name: req.body.name,
|
name: req.body.name,
|
||||||
tags: req.body.tags,
|
tags: req.body.tags,
|
||||||
|
auditLines: req.body.auditLines,
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await newObject({
|
const result = await newObject({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user