fix(authentication)!: use correct usecase and result

This commit is contained in:
2024-03-29 21:02:06 +01:00
parent 283bf80243
commit cca7b29a6d
15 changed files with 43 additions and 45 deletions
@@ -57,7 +57,7 @@ void main() {
() => authenticationRepository.sendPasswordResetEmail(
email: any(named: 'email'),
),
).thenAnswer((_) async => const Ok(null));
).thenAnswer((_) async => Ok(null));
when(
() => authenticationRepository.formRepository,
@@ -157,7 +157,7 @@ void main() {
authenticationRepository: authenticationRepository,
),
act: (cubit) => cubit.submit(),
expect: () => const <PasswordResetState>[],
expect: () => <PasswordResetState>[],
);
blocTest<PasswordResetCubit<int>, PasswordResetState>(
@@ -272,7 +272,7 @@ void main() {
() => authenticationRepository.sendPasswordResetEmail(
email: any(named: 'email'),
),
).thenAnswer((_) async => const Err(ServerException()));
).thenAnswer((_) async => Err(const ServerException()));
when(
() => formRepository.accessForm(AuthFormName.passwordResetForm),
).thenAnswer(