forked from eatvio/eatvio_app
feat: introduce DiaryCubit for managing user diary and diet plans, and add new unit tests for various features.
This commit is contained in:
@@ -192,7 +192,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('sendEmailCode - обработка ошибки', () async {
|
||||
cubit = VerifyEmailCubit(profileRepository: mockRepository);
|
||||
cubit = VerifyEmailCubit(profileRepository: mockRepository, prefs: mockPrefs);
|
||||
|
||||
when(mockRepository.getMyProfile()).thenThrow(Exception('Network error'));
|
||||
|
||||
@@ -204,7 +204,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('tryVerify - обработка ошибки при верификации', () async {
|
||||
cubit = VerifyEmailCubit(profileRepository: mockRepository);
|
||||
cubit = VerifyEmailCubit(profileRepository: mockRepository, prefs: mockPrefs);
|
||||
|
||||
when(mockRepository.tryVerifyEmailByCode('123456')).thenThrow(Exception('Network error'));
|
||||
|
||||
@@ -214,7 +214,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('changeEmail - обработка ошибки', () async {
|
||||
cubit = VerifyEmailCubit(profileRepository: mockRepository);
|
||||
cubit = VerifyEmailCubit(profileRepository: mockRepository, prefs: mockPrefs);
|
||||
|
||||
when(mockRepository.sendEmailCode(newEmail: 'new@example.com')).thenThrow(Exception('Network error'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user