fix(auth): correct resend response type and improve error messages

This commit is contained in:
qzl
2026-02-26 12:13:50 +08:00
parent 11666e6492
commit cc7a70d793
7 changed files with 174 additions and 219 deletions
@@ -170,13 +170,9 @@ void main() {
build: () => cubit,
seed: () => RegisterState(pendingEmail: 'test@example.com'),
setUp: () {
when(() => mockRepository.signupResend(any())).thenAnswer(
(_) async => SignupStartResponse(
status: 'ok',
email: 'test@example.com',
message: 'Code sent',
),
);
when(
() => mockRepository.signupResend(any()),
).thenAnswer((_) async => SignupResendResponse(message: 'Code sent'));
},
act: (c) => c.resendCode(),
expect: () => [