2016-03-21 11:46:37 +05:30
|
|
|
import FinishState from 'services/authFlow/FinishState';
|
|
|
|
|
|
|
|
import { bootstrap, expectNavigate } from './helpers';
|
|
|
|
|
|
|
|
describe('FinishState', () => {
|
2019-11-27 14:33:32 +05:30
|
|
|
let state;
|
|
|
|
let context;
|
|
|
|
let mock;
|
2016-03-21 11:46:37 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
beforeEach(() => {
|
|
|
|
state = new FinishState();
|
2016-03-21 11:46:37 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
const data = bootstrap();
|
|
|
|
context = data.context;
|
|
|
|
mock = data.mock;
|
|
|
|
});
|
2016-03-21 11:46:37 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
afterEach(() => {
|
|
|
|
mock.verify();
|
|
|
|
});
|
2016-03-21 11:46:37 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
describe('#enter', () => {
|
|
|
|
it('should navigate to /oauth/finish', () => {
|
|
|
|
expectNavigate(mock, '/oauth/finish');
|
2016-03-21 11:46:37 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
state.enter(context);
|
2016-03-21 11:46:37 +05:30
|
|
|
});
|
2019-11-27 14:33:32 +05:30
|
|
|
});
|
2016-03-21 11:46:37 +05:30
|
|
|
});
|