Added front unit test
This commit is contained in:
parent
5cbd8d632d
commit
31205f4556
|
@ -99,7 +99,7 @@ describe('Entry', () => {
|
|||
describe('onSubmit()', () => {
|
||||
it(`should perform a query to update columns`, () => {
|
||||
jest.spyOn(controller.vnApp, 'showSuccess');
|
||||
jest.spyOn(controller.$state, 'go');
|
||||
controller.$state.go = jest.fn();
|
||||
|
||||
controller.import = {
|
||||
observation: '123456',
|
||||
|
@ -121,7 +121,7 @@ describe('Entry', () => {
|
|||
expect(importData.buys.length).toEqual(2);
|
||||
|
||||
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!');
|
||||
expect(controller.$state.go).toHaveBeenCalledWith('foo.card.summary', {id: 1}, undefined);
|
||||
expect(controller.$state.go).toHaveBeenCalledWith('entry.card.buy.index');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue