| 1 | import 'package:flutter_test/flutter_test.dart'; |
| 2 | import 'package:localmind/features/chat/utils/attachment_helpers.dart'; |
| 3 | |
| 4 | void main() { |
| 5 | test('recognizes supported text documents and PDFs', () { |
| 6 | expect(AttachmentHelpers.isDocumentPath('/tmp/notes.md'), isTrue); |
| 7 | expect(AttachmentHelpers.isDocumentPath('/tmp/data.json'), isTrue); |
| 8 | expect(AttachmentHelpers.isDocumentPath('/tmp/table.csv'), isTrue); |
| 9 | expect(AttachmentHelpers.isDocumentPath('/tmp/report.PDF'), isTrue); |
| 10 | expect(AttachmentHelpers.isDocumentPath('/tmp/archive.zip'), isFalse); |
| 11 | }); |
| 12 | |
| 13 | test('document picker extensions include PDF and common text formats', () { |
| 14 | expect( |
| 15 | AttachmentHelpers.supportedDocumentExtensions, |
| 16 | containsAll(['txt', 'md', 'pdf', 'json', 'csv', 'yaml']), |
| 17 | ); |
| 18 | }); |
| 19 | } |