mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
chore(test): check quantity after serial number issued
This commit is contained in:
parent
41ed88742f
commit
6a73bf4745
@ -5,10 +5,9 @@ import {
|
|||||||
import { ModelNameEnum } from 'models/types';
|
import { ModelNameEnum } from 'models/types';
|
||||||
import test from 'tape';
|
import test from 'tape';
|
||||||
import { closeTestFyo, getTestFyo, setupTestFyo } from 'tests/helpers';
|
import { closeTestFyo, getTestFyo, setupTestFyo } from 'tests/helpers';
|
||||||
|
import { getSerialNumbers } from '../helpers';
|
||||||
import { MovementTypeEnum } from '../types';
|
import { MovementTypeEnum } from '../types';
|
||||||
import { getItem, getStockMovement } from './helpers';
|
import { getItem, getStockMovement } from './helpers';
|
||||||
import { getSerialNumbers } from '../helpers';
|
|
||||||
import type { Doc } from 'fyo/model/doc';
|
|
||||||
|
|
||||||
const fyo = getTestFyo();
|
const fyo = getTestFyo();
|
||||||
|
|
||||||
@ -409,6 +408,19 @@ test('Material Issue, status change of Serial Number', async (t) => {
|
|||||||
const status = await fyo.getValue(ModelNameEnum.SerialNumber, sn, 'status');
|
const status = await fyo.getValue(ModelNameEnum.SerialNumber, sn, 'status');
|
||||||
t.equal(status, 'Delivered', `Serial Number ${sn} updated to Delivered`);
|
t.equal(status, 'Delivered', `Serial Number ${sn} updated to Delivered`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.equal(
|
||||||
|
await fyo.db.getStockQuantity(
|
||||||
|
itemMap.Pen.name,
|
||||||
|
locationMap.LocationOne,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
serialNumbers
|
||||||
|
),
|
||||||
|
0,
|
||||||
|
'location one has quantity 0 of serialNumbers after issue'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
closeTestFyo(fyo, __filename);
|
closeTestFyo(fyo, __filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user