Files
sharedinbox/test/unit/tls_error_test.dart
T
Thomas Güttler 43e1744614 feat: implement optimized Undo for delete and move actions
- Added UndoService with 10-action history stack.
- Integrated Undo Snackbar into EmailListScreen and EmailDetailScreen.
- Added EmailRepository.cancelPendingChange to optimize undo by removing
  unsynced local mutations.
- Fixed sorting bug in compareMailboxes for unknown roles.
- Increased unit coverage to 83% with new model and utility tests.
- Verified with full test suite (task check).
2026-05-08 11:14:54 +02:00

33 lines
860 B
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:sharedinbox/data/imap/tls_error.dart';
void main() {
group('rethrowAsTlsHint', () {
test('wraps WRONG_VERSION_NUMBER into TlsModeMismatchException', () {
final original = Exception('Handshake error: WRONG_VERSION_NUMBER');
expect(
() =>
rethrowAsTlsHint(original, StackTrace.current, 'example.com', 465),
throwsA(
isA<TlsModeMismatchException>().having(
(e) => e.original,
'original',
original,
),
),
);
});
test('rethrows other errors unchanged', () {
final original = Exception('Some other error');
expect(
() =>
rethrowAsTlsHint(original, StackTrace.current, 'example.com', 465),
throwsA(original),
);
});
});
}