mirror of
https://github.com/frappe/books.git
synced 2025-01-22 14:48:25 +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 test from 'tape';
|
||||
import { closeTestFyo, getTestFyo, setupTestFyo } from 'tests/helpers';
|
||||
import { getSerialNumbers } from '../helpers';
|
||||
import { MovementTypeEnum } from '../types';
|
||||
import { getItem, getStockMovement } from './helpers';
|
||||
import { getSerialNumbers } from '../helpers';
|
||||
import type { Doc } from 'fyo/model/doc';
|
||||
|
||||
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');
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user