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 @@ -1184,6 +1184,22 @@ describe("UserDal", () => {
11841184 expect ( read . email ) . toEqual ( "next" ) ;
11851185 expect ( read . emailVerified ) . toEqual ( false ) ;
11861186 } ) ;
1187+
1188+ it ( "should update email and isVerified" , async ( ) => {
1189+ //given
1190+ const { uid } = await UserTestData . createUser ( {
1191+ email : "init" ,
1192+ emailVerified : false ,
1193+ } ) ;
1194+
1195+ //when
1196+ await expect ( UserDAL . updateEmail ( uid , "next" , true ) ) . resolves . toBe ( true ) ;
1197+
1198+ //then
1199+ const read = await UserDAL . getUser ( uid , "read" ) ;
1200+ expect ( read . email ) . toEqual ( "next" ) ;
1201+ expect ( read . emailVerified ) . toEqual ( true ) ;
1202+ } ) ;
11871203 } ) ;
11881204 describe ( "resetPb" , ( ) => {
11891205 it ( "throws for nonexisting user" , async ( ) => {
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ export async function updateQuoteRatings(
236236export async function updateEmail (
237237 uid : string ,
238238 email : string ,
239- emailVerified : boolean = true
239+ emailVerified : boolean = false
240240) : Promise < boolean > {
241241 await updateUser (
242242 { uid } ,
You can’t perform that action at this time.
0 commit comments