mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Sketch backend test to change Email Address
This commit is contained in:
parent
5d5540d8c8
commit
8a05de5b2d
36
backend/src/schema/resolvers/emails.spec.js
Normal file
36
backend/src/schema/resolvers/emails.spec.js
Normal 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')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user