2019-12-08 00:32:00 +05:30
|
|
|
import FinishState from 'app/services/authFlow/FinishState';
|
2016-03-21 11:46:37 +05:30
|
|
|
|
|
|
|
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
|
|
|
});
|