order refactor
This commit is contained in:
parent
81c6546e96
commit
1136afa484
|
@ -36,6 +36,17 @@ describe('Client', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('onSubmit()', () => {
|
||||||
|
it(`should call notifyChanges() if there are changes on payMethod data`, () => {
|
||||||
|
spyOn(controller, 'notifyChanges');
|
||||||
|
controller.client.payMethodFk = 5;
|
||||||
|
controller.onSubmit();
|
||||||
|
|
||||||
|
expect(controller.hasPaymethodChanged()).toBeTruthy();
|
||||||
|
expect(controller.notifyChanges).toHaveBeenCalledWith();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('hasPaymethodChanged()', () => {
|
describe('hasPaymethodChanged()', () => {
|
||||||
it(`should call hasPaymethodChanged() and return true if there are changes on payMethod data`, () => {
|
it(`should call hasPaymethodChanged() and return true if there are changes on payMethod data`, () => {
|
||||||
controller.client.payMethodFk = 5;
|
controller.client.payMethodFk = 5;
|
||||||
|
@ -50,15 +61,6 @@ describe('Client', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('onSubmit()', () => {
|
|
||||||
it(`should call notifyChanges() if there are changes on payMethod data`, () => {
|
|
||||||
spyOn(controller, 'notifyChanges');
|
|
||||||
controller.client.payMethodFk = 5;
|
|
||||||
controller.onSubmit();
|
|
||||||
|
|
||||||
expect(controller.hasPaymethodChanged()).toBeTruthy();
|
|
||||||
expect(controller.notifyChanges).toHaveBeenCalledWith();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue