mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-04 14:49:44 +08:00
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:
@ -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);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user