#365: Redirect user to login page, when token can not be refreshed. Further improvement of auth errors handling

This commit is contained in:
SleepWalker
2017-12-30 21:04:31 +02:00
parent 50d753e006
commit 9afa4be8cb
20 changed files with 519 additions and 313 deletions

View File

@@ -35,7 +35,7 @@ describe('Accounts reducer', () => {
describe(ACTIVATE, () => {
it('sets active account', () => {
expect(accounts(initial, activate(account)), 'to satisfy', {
active: account
active: account.id
});
});
});
@@ -108,14 +108,14 @@ describe('Accounts reducer', () => {
const newToken = 'newToken';
expect(accounts(
{active: account, available: [account]},
{active: account.id, available: [account]},
updateToken(newToken)
), 'to satisfy', {
active: {
active: account.id,
available: [{
...account,
token: newToken
},
available: [account]
}]
});
});
});