#125: support activation key in url

This commit is contained in:
SleepWalker
2016-06-05 15:16:41 +03:00
parent 2737c6502b
commit 64089bc7ab
5 changed files with 41 additions and 7 deletions

View File

@@ -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: {