18 lines
700 B
Dart
18 lines
700 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:motorcycle_dash/services/alerts/road_alert_providers.dart';
|
|
|
|
void main() {
|
|
TestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
test('activeRoadAlertProviders does not automatically include mock provider', () {
|
|
final container = ProviderContainer();
|
|
addTearDown(container.dispose);
|
|
|
|
final providers = container.read(activeRoadAlertProviders);
|
|
// Mock provider id is 'mock_police_debug'
|
|
expect(providers.any((p) => p.id == 'mock_police_debug'), isFalse,
|
|
reason: 'Mock police/speedcam alerts must not be injected automatically in live alerts');
|
|
});
|
|
}
|