mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#125: support activation key in url
This commit is contained in:
@@ -23,9 +23,13 @@ describe('ActivationState', () => {
|
||||
|
||||
describe('#enter', () => {
|
||||
it('should navigate to /activation', () => {
|
||||
const expectedPath = '/activation';
|
||||
context.getState.returns({
|
||||
user: {
|
||||
isActive: false
|
||||
},
|
||||
routing: {
|
||||
location: {pathname: expectedPath}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -34,6 +38,22 @@ describe('ActivationState', () => {
|
||||
state.enter(context);
|
||||
});
|
||||
|
||||
it('should navigate to /activation/key', () => {
|
||||
const expectedPath = '/activation/sasx5AS4d61';
|
||||
context.getState.returns({
|
||||
user: {
|
||||
isActive: false
|
||||
},
|
||||
routing: {
|
||||
location: {pathname: expectedPath}
|
||||
}
|
||||
});
|
||||
|
||||
expectNavigate(mock, expectedPath);
|
||||
|
||||
state.enter(context);
|
||||
});
|
||||
|
||||
it('should transition to complete state if account activated', () => {
|
||||
context.getState.returns({
|
||||
user: {
|
||||
|
Reference in New Issue
Block a user