fix(coillection): collection created dates were wrong for testing purposes
This commit is contained in:
parent
559ff95fd7
commit
ca82d7e759
|
@ -3,7 +3,7 @@ module.exports = Self => {
|
|||
description: 'Get pending collections from a worker',
|
||||
accessType: 'READ',
|
||||
returns: {
|
||||
type: 'Object',
|
||||
type: 'object',
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
describe('getCollection()', () => {
|
||||
it('return list of collection', async() => {
|
||||
describe('ticket getCollection()', () => {
|
||||
it('should return a list of collections', async() => {
|
||||
let ctx = {req: {accessToken: {userId: 1106}}};
|
||||
let response = await app.models.Collection.getCollection(ctx);
|
||||
let response = await models.Collection.getCollection(ctx);
|
||||
|
||||
expect(response.length).toBeGreaterThan(0);
|
||||
expect(response[0].collectionFk).toEqual(1);
|
||||
|
|
|
@ -1067,10 +1067,10 @@ INSERT INTO `vn`.`itemPlacement`(`id`, `itemFk`, `warehouseFk`, `code`)
|
|||
(4, 2, 1, 'A44');
|
||||
|
||||
|
||||
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`)
|
||||
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`, `created`)
|
||||
VALUES
|
||||
(1, 1106, 5),
|
||||
(2, 1106, 14);
|
||||
(1, 1106, 5, DATE_ADD(CURDATE(),INTERVAL +1 DAY)),
|
||||
(2, 1106, 14, CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`ticketCollection`(`id`, `ticketFk`, `collectionFk`)
|
||||
VALUES
|
||||
|
@ -2224,6 +2224,11 @@ INSERT INTO `vn`.`workerTimeControlParams` (`id`, `dayBreak`, `weekBreak`, `week
|
|||
|
||||
INSERT IGNORE INTO `vn`.`greugeConfig` (`id`, `freightPickUpPrice`) VALUES ('1', '11');
|
||||
|
||||
INSERT INTO `vn`.`temperature`(`code`, `name`, `description`)
|
||||
VALUES
|
||||
('WARM', 'Warm', 'Warm'),
|
||||
('COOL', 'Cool', 'Cool');
|
||||
|
||||
INSERT INTO `vn`.`thermograph`(`id`, `model`)
|
||||
VALUES
|
||||
('TMM190901395', 'TEMPMATE'),
|
||||
|
@ -2231,7 +2236,8 @@ INSERT INTO `vn`.`thermograph`(`id`, `model`)
|
|||
('TZ1905012010', 'DISPOSABLE'),
|
||||
('138350-0', 'DISPOSABLE');
|
||||
|
||||
INSERT INTO `vn`.`travelThermograph`(`thermographFk`, `created`, `warehouseFk`, `travelFk`, `temperature`, `result`, `dmsFk`)
|
||||
|
||||
INSERT INTO `vn`.`travelThermograph`(`thermographFk`, `created`, `warehouseFk`, `travelFk`, `temperatureFk`, `result`, `dmsFk`)
|
||||
VALUES
|
||||
('TMM190901395', CURDATE(), 1, 1, 'WARM', 'Ok', NULL),
|
||||
('TL.BBA85422', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 2, 'COOL', 'Ok', NULL),
|
||||
|
|
Loading…
Reference in New Issue