diff --git a/client/client/src/credit/create/credit-create.spec.js b/client/client/src/credit/create/credit-create.spec.js index 7dea16d10..6efd355d1 100644 --- a/client/client/src/credit/create/credit-create.spec.js +++ b/client/client/src/credit/create/credit-create.spec.js @@ -37,6 +37,7 @@ describe('Client', () => { $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({}); controller = $componentController('vnClientCreditCreate', {$scope: $scope}, {$state: $state}); })); + describe('onSubmit()', () => { it('should perform a query to check (GET) if the client has an active recovery', () => { $httpBackend.whenGET(`/client/api/Recoveries/101/hasActiveRecovery`).respond(true); @@ -65,6 +66,7 @@ describe('Client', () => { expect(controller.addCredit).toHaveBeenCalledWith(); }); }); + describe('returnDialog()', () => { it('should call addCredit() when is called with ACCEPT', () => { spyOn(controller, 'addCredit'); @@ -73,6 +75,7 @@ describe('Client', () => { expect(controller.addCredit).toHaveBeenCalledWith(); }); }); + describe('addCredit()', () => { it('should call the function go() on $state to go to the credit list', () => { spyOn($state, 'go');