diff --git a/client/client/src/billing-data/index.spec.js b/client/client/src/billing-data/index.spec.js index 73f196206..a777c28d5 100644 --- a/client/client/src/billing-data/index.spec.js +++ b/client/client/src/billing-data/index.spec.js @@ -25,8 +25,7 @@ describe('Client', () => { }; } }; - $httpBackend.get = jasmine.createSpy('get').and.returnValue(Promise.resolve()); - controller = $componentController('vnClientBillingData', {$scope: $scope}, {$http: $httpBackend}); + controller = $componentController('vnClientBillingData', {$scope: $scope}); controller.client = {id: 101, name: 'Client name', payMethodFk: 4}; })); @@ -47,6 +46,15 @@ describe('Client', () => { }); }); + describe('notifyChanges()', () => { + it(`should call notifyChanges() and perform a GET query`, () => { + $httpBackend.when('GET', `/mailer/notification/payment-update/101`).respond(true); + $httpBackend.expect('GET', `/mailer/notification/payment-update/101`); + controller.notifyChanges(); + $httpBackend.flush(); + }); + }); + describe('hasPaymethodChanged()', () => { it(`should call hasPaymethodChanged() and return true if there are changes on payMethod data`, () => { controller.client.payMethodFk = 5; diff --git a/client/client/src/credit-insurance/create/index.html b/client/client/src/credit-insurance/create/index.html index 38c598601..f4b18be8f 100644 --- a/client/client/src/credit-insurance/create/index.html +++ b/client/client/src/credit-insurance/create/index.html @@ -1,4 +1,4 @@ -