From 2b43de6e93ecd4092bc6bbf87313706506765a73 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Thu, 26 Sep 2019 16:46:41 +0200 Subject: [PATCH] Test out Note deletion --- test/note_storage_test.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/note_storage_test.dart b/test/note_storage_test.dart index 1be7bb31..d30a62e2 100644 --- a/test/note_storage_test.dart +++ b/test/note_storage_test.dart @@ -48,6 +48,13 @@ void main() { notes.sort(); expect(loadedNotes, notes); + + await Future.forEach(notes, (Note note) async { + await note.remove(); + }); + expect(tempDir.listSync(recursive: true).length, 0); + expect(File(n1Path).existsSync(), isFalse); + expect(File(n2Path).existsSync(), isFalse); }); }); }