2233_global-refactor #341

Merged
bernat merged 10 commits from 2233_global-refactor into dev 2020-07-29 09:29:06 +00:00
3 changed files with 4 additions and 5 deletions
Showing only changes of commit 85b3b52e39 - Show all commits

View File

@ -25,7 +25,7 @@
</form>
<vn-confirm
vn-id="confirmation"
on-response="$ctrl.returnDialog($response)"
on-accept="$ctrl.returnDialog()"
question="Esta modificación retrasará el plazo del próximo recobro"
message="¿Desea continuar?">
</vn-confirm>

View File

@ -16,9 +16,8 @@ class Controller extends Section {
this.goToIndex();
}
returnDialog(response) {
if (response === 'accept')
this.addCredit();
returnDialog() {
this.addCredit();
}
goToIndex() {

View File

@ -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();
});