Skip to content

Commit d6ea845

Browse files
authored
Send Verification Email during Sign Up (canada-ca#2203)
* update sign up mutation to send verification link * update related tests * update tests that use signup mutation
1 parent 7c41c3e commit d6ea845

7 files changed

Lines changed: 660 additions & 216 deletions

File tree

api-js/src/domain/mutations/__tests__/create-domain.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ describe('create a domain', () => {
8484
loaders: {
8585
loadUserByUserName: loadUserByUserName({ query }),
8686
},
87+
notify: {
88+
sendVerificationEmail: jest.fn(),
89+
},
90+
request: {
91+
protocol: 'https',
92+
get: (text) => text,
93+
},
8794
},
8895
)
8996
org = await collections.organizations.save({

api-js/src/organization/mutations/__tests__/verify-organization.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ describe('removing an organization', () => {
8383
loaders: {
8484
loadUserByUserName: loadUserByUserName({ query }),
8585
},
86+
notify: {
87+
sendVerificationEmail: jest.fn(),
88+
},
89+
request: {
90+
protocol: 'https',
91+
get: (text) => text,
92+
},
8693
},
8794
)
8895
consoleOutput = []

api-js/src/user/mutations/__tests__/reset-password.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ describe('reset users password', () => {
8181
loaders: {
8282
loadUserByUserName: loadUserByUserName({ query }),
8383
},
84+
notify: {
85+
sendVerificationEmail: jest.fn(),
86+
},
87+
request: {
88+
protocol: 'https',
89+
get: (text) => text,
90+
},
8491
},
8592
)
8693
consoleOutput.length = 0

api-js/src/user/mutations/__tests__/sign-in.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ describe('authenticate user account', () => {
8383
loaders: {
8484
loadUserByUserName: loadUserByUserName({ query }),
8585
},
86+
notify: {
87+
sendVerificationEmail: jest.fn(),
88+
},
89+
request: {
90+
protocol: 'https',
91+
get: (text) => text,
92+
},
8693
},
8794
)
8895
consoleOutput.length = 0

0 commit comments

Comments
 (0)