order refactor

This commit is contained in:
Carlos Jimenez 2018-07-31 11:51:24 +02:00
parent 81c6546e96
commit 1136afa484
1 changed files with 11 additions and 9 deletions

View File

@ -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()', () => {
it(`should call hasPaymethodChanged() and return true if there are changes on payMethod data`, () => {
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();
});
});
});
});