diff --git a/modules/client/front/credit/create/index.html b/modules/client/front/credit/create/index.html index c77c1556c..e3160a2ae 100644 --- a/modules/client/front/credit/create/index.html +++ b/modules/client/front/credit/create/index.html @@ -25,7 +25,7 @@ diff --git a/modules/client/front/credit/create/index.js b/modules/client/front/credit/create/index.js index dae63d0c9..3c1d376ed 100644 --- a/modules/client/front/credit/create/index.js +++ b/modules/client/front/credit/create/index.js @@ -16,9 +16,8 @@ class Controller extends Section { this.goToIndex(); } - returnDialog(response) { - if (response === 'accept') - this.addCredit(); + returnDialog() { + this.addCredit(); } goToIndex() { diff --git a/modules/client/front/credit/create/index.spec.js b/modules/client/front/credit/create/index.spec.js index 3237b61c1..2fda0af65 100644 --- a/modules/client/front/credit/create/index.spec.js +++ b/modules/client/front/credit/create/index.spec.js @@ -75,7 +75,7 @@ describe('Client', () => { describe('returnDialog()', () => { it('should call addCredit() when is called with accept', () => { jest.spyOn(controller, 'addCredit'); - controller.returnDialog('accept'); + controller.returnDialog(); expect(controller.addCredit).toHaveBeenCalledWith(); });