test fixed
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javi Gallego 2021-08-10 08:18:52 +02:00
parent cbaba8a075
commit 3424fabd5b
2 changed files with 10 additions and 10 deletions

View File

@ -3,4 +3,6 @@ DELETE FROM `salix`.`ACL` WHERE id = 188;
UPDATE `salix`.`ACL` tdms SET tdms.accessType = '*'
WHERE tdms.id = 165;
INSERT INTO salix.ACL (model, principalId, property, accessType)
VALUES ('InvoiceInTax','administrative', '*', '*');
VALUES ('InvoiceInTax','administrative', '*', '*');
INSERT INTO salix.ACL (model, principalId, property, accessType)
VALUES ('InvoiceInLog','administrative', '*', 'READ');

View File

@ -22,20 +22,18 @@ describe('InvoiceIn', () => {
controller.invoiceIn = {id: 1};
}));
describe('setTaxRate() setter', () => {
describe('taxRate()', () => {
it('should set tax rate with the Sage tax type value', () => {
const taxTypeSage = {
const taxRateSelection = {
rate: 21
};
$scope.taxTypeSage = {};
$scope.taxTypeSage.selection = taxTypeSage;
const invoiceInTax = {
taxableBase: 200
};
$scope.taxableBase = {};
$scope.taxableBase.value = 200;
const taxRate = controller.taxRate(invoiceInTax, taxRateSelection);
controller.taxRateSelection = 0;
expect(controller.taxRate).toEqual(42);
expect(taxRate).toEqual(42);
});
});