FlattenedNotesFolder: Test reset

This commit is contained in:
Vishesh Handa
2020-05-31 03:16:17 +02:00
parent 5788a2bde0
commit e740bd2223

View File

@ -34,6 +34,13 @@ void main() {
test('Should load all the notes flattened', () async {
var f = FlattenedNotesFolder(rootFolder);
expect(f.notes.length, 300);
var tempDir = await Directory.systemTemp.createTemp('_test_');
await _writeRandomNote(Random(), tempDir.path);
rootFolder.reset(tempDir.path);
await rootFolder.loadRecursively();
expect(f.notes.length, 1);
});
});
}