Refactored user/volunteer/participant identity.
This commit is contained in:
parent
e640bf8bed
commit
1eb6a99ff6
28 changed files with 469 additions and 265 deletions
|
|
@ -22,10 +22,10 @@ describe('session', () => {
|
|||
})
|
||||
|
||||
it('saves and retrieves session', async () => {
|
||||
await saveSession('tok123', { id: 1, username: 'admin', role: 'admin' })
|
||||
await saveSession('tok123', { id: 1, email: 'admin@example.com', roles: ['admin'] })
|
||||
const s = await getSession()
|
||||
expect(s.token).toBe('tok123')
|
||||
expect(s.user.username).toBe('admin')
|
||||
expect(s.user.email).toBe('admin@example.com')
|
||||
})
|
||||
|
||||
it('clears session and meta', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue