1461 fix test back
gitea/salix/dev This commit looks good Details

This commit is contained in:
Bernat 2019-05-27 09:19:23 +02:00
parent 16c8d2fd2a
commit 59069749a2
5 changed files with 26 additions and 26 deletions

View File

@ -648,7 +648,7 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric
(5, 1, 2, 'Ranged weapon longbow 2m', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
(6, 1, 3, 'Ranged weapon longbow 2m', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
(7, 2, 11, 'Melee weapon combat fist 15cm', 15, 1.46, 0, 0, 0, CURDATE()),
(8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 3.05, 0, 0, 0, CURDATE()),
(8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 3.04, 0, 0, 0, CURDATE()),
(9, 1, 16, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, CURDATE()),
(10, 2, 16, 'Melee weapon combat fist 15cm', 10, 1.07, 0, 0, 0, CURDATE()),
(11, 1, 16, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, CURDATE()),
@ -706,7 +706,7 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
(7, 29, -4.6),
(7, 39, 0.01),
(8, 15, 0.039),
(8, 21, -0.003),
(8, 21, -0.009),
(8, 28, 20.72),
(8, 29, -19.72),
(8, 37, 2),
@ -1435,25 +1435,25 @@ INSERT INTO `vn`.`workerTimeControl`(`userFk`,`timed`,`manual`)
INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`)
VALUES
(1, 'Facturas Recibidas', '\recibidas', NULL, NULL),
(2, 'Doc oficial', '\oficial', NULL, NULL),
(3, 'Laboral', '\laboral', NULL, NULL),
(4, 'Albaranes recibidos', '\entradas', NULL, NULL),
(5, 'Otros', '\otros', 1, NULL),
(6, 'Pruebas', '\pruebas', NULL, NULL),
(7, 'IAE Clientes', '\IAE_Clientes', NULL, NULL),
(8, 'Fiscal', '\fiscal', NULL, NULL),
(9, 'Vehiculos', '\vehiculos', NULL, NULL),
(10, 'Plantillas', '\plantillas', NULL, NULL),
(11, 'Contratos', '\contratos', NULL, NULL),
(12, 'ley de pagos', '\ley pagos', NULL, NULL),
(13, 'Basura', '\basura', NULL, NULL),
(14, 'Ticket', '\tickets', 1, NULL),
(15, 'Presupuestos', '\Presupuestos', NULL, NULL),
(16, 'Logistica', '\logistica', NULL, NULL),
(17, 'cmr', '\cmr', NULL, NULL),
(18, 'dua', '\dua', NULL, NULL),
(19, 'inmovilizado', '\inmovilizado', NULL, NULL);
(1, 'Facturas Recibidas', 'recibidas', NULL, NULL),
(2, 'Doc oficial', 'oficial', NULL, NULL),
(3, 'Laboral', 'laboral', NULL, NULL),
(4, 'Albaranes recibidos', 'entradas', NULL, NULL),
(5, 'Otros', 'otros', 1, NULL),
(6, 'Pruebas', 'pruebas', NULL, NULL),
(7, 'IAE Clientes', 'IAE_Clientes', NULL, NULL),
(8, 'Fiscal', 'fiscal', NULL, NULL),
(9, 'Vehiculos', 'vehiculos', NULL, NULL),
(10, 'Plantillas', 'plantillas', NULL, NULL),
(11, 'Contratos', 'contratos', NULL, NULL),
(12, 'ley de pagos', 'ley pagos', NULL, NULL),
(13, 'Basura', 'basura', NULL, NULL),
(14, 'Ticket', 'tickets', 1, NULL),
(15, 'Presupuestos', 'Presupuestos', NULL, NULL),
(16, 'Logistica', 'logistica', NULL, NULL),
(17, 'cmr', 'cmr', NULL, NULL),
(18, 'dua', 'dua', NULL, NULL),
(19, 'inmovilizado', 'inmovilizado', NULL, NULL);
INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `workerFk`, `warehouseFk`, `companyFk`, `hardCopyNumber`, `hasFile`, `reference`, `description`, `created`)
VALUES

View File

@ -7,6 +7,6 @@ describe('Client get', () => {
expect(result.id).toEqual(101);
expect(result.name).toEqual('Bruce Wayne');
expect(result.debt).toEqual(-14.65);
expect(result.debt).toEqual(-14.78);
});
});

View File

@ -4,7 +4,7 @@ describe('client getDebt()', () => {
it('should return the client debt', async() => {
let result = await app.models.Client.getDebt(101);
expect(result.debt).toEqual(-14.65);
expect(result.debt).toEqual(-14.78);
});
});

View File

@ -17,7 +17,7 @@ describe('client summary()', () => {
it('should return a summary object containing debt', async() => {
let result = await app.models.Client.summary(101);
expect(result.debt.debt).toEqual(-14.65);
expect(result.debt.debt).toEqual(-14.78);
});
it('should return a summary object containing averageInvoiced', async() => {

View File

@ -11,9 +11,9 @@ describe('sale priceDifference()', () => {
};
let result = await app.models.Sale.priceDifference(11, data);
expect(result.totalUnitPrice).toEqual(4.51);
expect(result.totalUnitPrice).toEqual(4.5);
expect(result.totalNewPrice).toEqual(4.24);
expect(result.totalDifference).toEqual(3.85);
expect(result.totalDifference).toEqual(3.75);
});
it('should return an error if the ticket state is not valid for modifications', async() => {