Sketch backend test to change Email Address

This commit is contained in:
roschaefer 2019-09-24 14:14:57 +02:00
parent 5d5540d8c8
commit 8a05de5b2d

View File

@ -0,0 +1,36 @@
describe('AddEmailAddress', () => {
it.todo('throws AuthorizationError')
describe('authenticated', () => {
it.todo('creates a new unverified `EmailAddress` node')
it.todo('connects EmailAddress to the authenticated user')
describe('even if an unverified `EmailAddress` already exists with that email', () =>{
it.todo('creates a new unverified `EmailAddress` node')
})
})
})
describe('VerifyEmailAddress', () => {
it.todo('throws AuthorizationError')
describe('authenticated', () => {
describe('if no unverified `EmailAddress` node exists', () => {
it.todo('throws UserInputError')
})
describe('given invalid nonce', () => {
it.todo('throws UserInputError')
})
describe('given valid nonce for unverified `EmailAddress` node', () => {
describe('but the address does not belong to the authenticated user', () => {
it.todo('throws UserInputError')
})
describe('and the `EmailAddress` belongs to the authenticated user', () => {
it.todo('verifies the `EmailAddress`')
it.todo('connects the new `EmailAddress` as PRIMARY')
it.todo('removes previous PRIMARY relationship')
})
})
})
})