test(unit): fix fe_matter test
This commit is contained in:
parent
67287ec9a3
commit
cc9434da67
1 changed files with 4 additions and 3 deletions
|
|
@ -22,12 +22,13 @@ This is the content of the note.`
|
|||
assert.Equal(t, []string{"test", "note"}, result.Tags)
|
||||
}
|
||||
|
||||
func TestParseTags_MissingDelimiter_ReturnsError(t *testing.T) {
|
||||
func TestParseTags_MissingDelimiter_ReturnsNil(t *testing.T) {
|
||||
input := `title: My Note
|
||||
tags: ["test", "note"]
|
||||
This is the content of the note.`
|
||||
|
||||
_, err := filehandling.ParseFrontMatter([]byte(input))
|
||||
val, err := filehandling.ParseFrontMatter([]byte(input))
|
||||
|
||||
assert.ErrorContains(t, err, "missing front matter delimiter")
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, val)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue