took a while to confirm this one
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e2481366a2
commit
85b3b52e39
|
@ -25,7 +25,7 @@
|
||||||
</form>
|
</form>
|
||||||
<vn-confirm
|
<vn-confirm
|
||||||
vn-id="confirmation"
|
vn-id="confirmation"
|
||||||
on-response="$ctrl.returnDialog($response)"
|
on-accept="$ctrl.returnDialog()"
|
||||||
question="Esta modificación retrasará el plazo del próximo recobro"
|
question="Esta modificación retrasará el plazo del próximo recobro"
|
||||||
message="¿Desea continuar?">
|
message="¿Desea continuar?">
|
||||||
</vn-confirm>
|
</vn-confirm>
|
||||||
|
|
|
@ -16,9 +16,8 @@ class Controller extends Section {
|
||||||
this.goToIndex();
|
this.goToIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
returnDialog(response) {
|
returnDialog() {
|
||||||
if (response === 'accept')
|
this.addCredit();
|
||||||
this.addCredit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
goToIndex() {
|
goToIndex() {
|
||||||
|
|
|
@ -75,7 +75,7 @@ describe('Client', () => {
|
||||||
describe('returnDialog()', () => {
|
describe('returnDialog()', () => {
|
||||||
it('should call addCredit() when is called with accept', () => {
|
it('should call addCredit() when is called with accept', () => {
|
||||||
jest.spyOn(controller, 'addCredit');
|
jest.spyOn(controller, 'addCredit');
|
||||||
controller.returnDialog('accept');
|
controller.returnDialog();
|
||||||
|
|
||||||
expect(controller.addCredit).toHaveBeenCalledWith();
|
expect(controller.addCredit).toHaveBeenCalledWith();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue