Add a test to make sure new notes always have a file extension

This bug has appeared way too many times
This commit is contained in:
Vishesh Handa
2020-06-06 13:52:23 +02:00
parent 82012d1d06
commit 991af6e1fb

View File

@ -170,5 +170,12 @@ Gee
expect(txtNote.canHaveMetadata, false); expect(txtNote.canHaveMetadata, false);
expect(txtNote.title.isEmpty, true); expect(txtNote.title.isEmpty, true);
}); });
test('New Notes have a file extension', () async {
var parentFolder = NotesFolderFS(null, tempDir.path);
var note = Note.newNote(parentFolder);
var path = note.filePath;
expect(path.endsWith('.md'), true);
});
}); });
} }