mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
FlattenedNotesFolder: Test reset
This commit is contained in:
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user