Added front unit test

This commit is contained in:
Joan Sanchez 2021-03-09 13:39:22 +01:00
parent 5cbd8d632d
commit 31205f4556
1 changed files with 2 additions and 2 deletions

View File

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