corrected spec descriptions

This commit is contained in:
Carlos Jimenez 2018-04-16 17:13:58 +02:00
parent 8537752d3c
commit f2f1579fa9
1 changed files with 9 additions and 11 deletions

View File

@ -22,8 +22,7 @@ describe('ticket', () => {
controller = $componentController('vnTicketVolume', {$scope: $scope}, {$httpBackend: $httpBackend}, {$state: $state}); controller = $componentController('vnTicketVolume', {$scope: $scope}, {$httpBackend: $httpBackend}, {$state: $state});
})); }));
describe('total()', () => { it('should join the sale volumes to its respective sale', () => {
it('should return the sum from all componenets in each sale', () => {
controller.ticket = {id: 1}; controller.ticket = {id: 1};
let response = {volumes: [[{saleFk: 1, m3: 0.008}, {saleFk: 2, m3: 0.003}]]}; let response = {volumes: [[{saleFk: 1, m3: 0.008}, {saleFk: 2, m3: 0.003}]]};
$httpBackend.whenGET(`/api/tickets/1/getVolume`).respond(response); $httpBackend.whenGET(`/api/tickets/1/getVolume`).respond(response);
@ -36,5 +35,4 @@ describe('ticket', () => {
}); });
}); });
}); });
});