31 lines
704 B
TypeScript
Raw Normal View History

import FinishState from 'app/services/authFlow/FinishState';
import { SinonMock } from 'sinon';
import { bootstrap, expectNavigate, MockedAuthContext } from './helpers';
describe('FinishState', () => {
2020-05-24 02:08:24 +03:00
let state: FinishState;
let context: MockedAuthContext;
let mock: SinonMock;
2020-05-24 02:08:24 +03:00
beforeEach(() => {
state = new FinishState();
2020-05-24 02:08:24 +03:00
const data = bootstrap();
context = data.context;
mock = data.mock;
});
2020-05-24 02:08:24 +03:00
afterEach(() => {
mock.verify();
});
2020-05-24 02:08:24 +03:00
describe('#enter', () => {
it('should navigate to /oauth/finish', () => {
expectNavigate(mock, '/oauth/finish');
2020-05-24 02:08:24 +03:00
state.enter(context);
});
});
});