File tree 2 files changed +10
-1
lines changed 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class GotrueFetch {
58
58
throw AuthWeakPasswordException (
59
59
message: _getErrorMessage (data),
60
60
statusCode: error.statusCode.toString (),
61
- reasons: data['weak_password' ]['reasons' ],
61
+ reasons: List < String >. from ( data['weak_password' ]['reasons' ]) ,
62
62
);
63
63
}
64
64
Original file line number Diff line number Diff line change @@ -102,6 +102,15 @@ void main() {
102
102
expect (data? .user.id, isA <String >());
103
103
expect (data? .user.userMetadata! ['Hello' ], 'World' );
104
104
});
105
+ test ('signUp() with week password throws AuthWeakPasswordException' ,
106
+ () async {
107
+ try {
108
+ await client.signUp (email: newEmail, password: '123' );
109
+ fail ('signUp with week password should throw exception' );
110
+ } catch (error) {
111
+ expect (error, isA <AuthWeakPasswordException >());
112
+ }
113
+ });
105
114
106
115
test ('Parsing invalid URL should throw' , () async {
107
116
const expiresIn = 12345 ;
You can’t perform that action at this time.
0 commit comments