File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1181,6 +1181,22 @@ describe("UserDal", () => {
11811181 expect ( read . email ) . toEqual ( "next" ) ;
11821182 expect ( read . emailVerified ) . toEqual ( false ) ;
11831183 } ) ;
1184+
1185+ it ( "should update email and isVerified" , async ( ) => {
1186+ //given
1187+ const { uid } = await UserTestData . createUser ( {
1188+ email : "init" ,
1189+ emailVerified : false ,
1190+ } ) ;
1191+
1192+ //when
1193+ await expect ( UserDAL . updateEmail ( uid , "next" , true ) ) . resolves . toBe ( true ) ;
1194+
1195+ //then
1196+ const read = await UserDAL . getUser ( uid , "read" ) ;
1197+ expect ( read . email ) . toEqual ( "next" ) ;
1198+ expect ( read . emailVerified ) . toEqual ( true ) ;
1199+ } ) ;
11841200 } ) ;
11851201 describe ( "resetPb" , ( ) => {
11861202 it ( "throws for nonexisting user" , async ( ) => {
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export async function updateQuoteRatings(
233233export async function updateEmail (
234234 uid : string ,
235235 email : string ,
236- emailVerified : boolean = true
236+ emailVerified : boolean = false
237237) : Promise < boolean > {
238238 await updateUser (
239239 { uid } ,
You can’t perform that action at this time.
0 commit comments