feat(tests): test coverage is 70.5

This commit is contained in:
misha
2026-01-26 16:38:15 +03:00
parent 92205c09d6
commit 29589ef6fd
49 changed files with 2690 additions and 18 deletions

View File

@@ -82,5 +82,35 @@ void main() {
// Проверяем, что есть хотя бы один маршрут
expect(routes.length, greaterThan(0));
});
test('appRouter имеет правильную конфигурацию', () {
expect(AppRouter.appRouter.configuration, isNotNull);
expect(AppRouter.appRouter.configuration.routes, isNotEmpty);
});
test('navigateToRegisterViaSocial создает правильную структуру extra', () {
const authResult = AuthResultEntity(
accessToken: 'test_token',
refreshToken: 'refresh_token',
userId: '1',
clientId: 'test_client_id',
);
const provider = 'yandex';
expect(() => AppRouter.navigateToRegisterViaSocial(authResult: authResult, provider: provider), returnsNormally);
});
test('navigateToRegisterViaSocial работает с разными провайдерами', () {
const authResult = AuthResultEntity(
accessToken: 'test_token',
refreshToken: 'refresh_token',
userId: '1',
clientId: 'test_client_id',
);
expect(() => AppRouter.navigateToRegisterViaSocial(authResult: authResult, provider: 'yandex'), returnsNormally);
expect(() => AppRouter.navigateToRegisterViaSocial(authResult: authResult, provider: 'vk'), returnsNormally);
expect(() => AppRouter.navigateToRegisterViaSocial(authResult: authResult, provider: 'google'), returnsNormally);
});
});
}