24 lines
621 B
Dart
24 lines
621 B
Dart
import 'package:abawo_bt_app/util/bluetooth_settings.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
group('isBluetoothPairingRecoveryError', () {
|
|
test('detects immediate disconnect connection failures', () {
|
|
expect(
|
|
isBluetoothPairingRecoveryError(
|
|
'Failed to connect to device-id: disconnected',
|
|
),
|
|
isTrue,
|
|
);
|
|
});
|
|
|
|
test('does not classify generic connection failures as pairing recovery',
|
|
() {
|
|
expect(
|
|
isBluetoothPairingRecoveryError('Timed out connecting to device-id'),
|
|
isFalse,
|
|
);
|
|
});
|
|
});
|
|
}
|