Files
eatvio_app/test/core/app_router_test.dart

30 lines
1.1 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:eatvio_app/core/app_router.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:go_router/go_router.dart';
void main() {
group('AppRouter', () {
test('navigatorKey инициализирован', () {
expect(AppRouter.navigatorKey, isNotNull);
expect(AppRouter.navigatorKey, isA<GlobalKey<NavigatorState>>());
});
test('appRouter инициализирован', () {
expect(AppRouter.appRouter, isNotNull);
expect(AppRouter.appRouter, isA<GoRouter>());
});
test('appRouter инициализирован с правильной конфигурацией', () {
expect(AppRouter.appRouter.configuration, isNotNull);
});
test('navigateToRegisterViaSocial вызывается без ошибок', () {
// Этот тест проверяет, что метод существует и может быть вызван
// Реальная навигация требует инициализированного контекста
expect(AppRouter.navigateToRegisterViaSocial, isA<Function>());
});
});
}