File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,21 @@ class FirebaseAuthTest {
127
127
assertEquals(" password" , credential.providerId)
128
128
}
129
129
130
+ @Test
131
+ fun testAuthResultStructure () = runTest {
132
+ val uid
= getTestUid(
" [email protected] " ,
" test123" )
133
+ val result
= auth.signInWithEmailAndPassword(
" [email protected] " ,
" test123" )
134
+ assertNotNull(result.user)
135
+ assertEquals(uid, result.user!! .uid)
136
+ assertNotNull(result.credential)
137
+ assertNotNull(result.credential!! .providerId)
138
+ assertNotNull(result.additionalUserInfo)
139
+ assertNotNull(result.additionalUserInfo!! .providerId)
140
+ assertNotNull(result.additionalUserInfo!! .username)
141
+ assertNotNull(result.additionalUserInfo!! .profile)
142
+ assertNotNull(result.additionalUserInfo!! .isNewUser)
143
+ }
144
+
130
145
private suspend fun getTestUid (email : String , password : String ): String {
131
146
val uid = auth.let {
132
147
val user = try {
You can’t perform that action at this time.
0 commit comments