tests fixed
This commit is contained in:
parent
c8dcf2b971
commit
30d59a6843
|
@ -25,9 +25,6 @@ describe('Client', () => {
|
||||||
describe('copyData()', () => {
|
describe('copyData()', () => {
|
||||||
it(`should define billData using client's data`, () => {
|
it(`should define billData using client's data`, () => {
|
||||||
controller.client = {
|
controller.client = {
|
||||||
credit: 1000000000000,
|
|
||||||
creditInsurance: null,
|
|
||||||
discount: 99,
|
|
||||||
dueDay: 0,
|
dueDay: 0,
|
||||||
iban: null,
|
iban: null,
|
||||||
payMethodFk: 1
|
payMethodFk: 1
|
||||||
|
|
|
@ -100,11 +100,11 @@ describe('Component vnWatcher', () => {
|
||||||
it(`should call controller.$state.go() function after calling controllers submit() function`, done => {
|
it(`should call controller.$state.go() function after calling controllers submit() function`, done => {
|
||||||
spyOn(controller, 'submit').and.returnValue(Promise.resolve());
|
spyOn(controller, 'submit').and.returnValue(Promise.resolve());
|
||||||
spyOn(controller.$state, 'go');
|
spyOn(controller.$state, 'go');
|
||||||
let state = 'the state';
|
let state = 'the.State';
|
||||||
controller.submitGo(state)
|
controller.submitGo(state)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
expect(controller.submit).toHaveBeenCalledWith();
|
expect(controller.submit).toHaveBeenCalledWith();
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith(state);
|
expect(controller.$state.go).toHaveBeenCalledWith(state, {});
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue