mirror of
https://github.com/kovetskiy/mark.git
synced 2026-04-20 05:12:35 +00:00
Extract conditional branch to function
This commit is contained in:
committed by
Manuel Rüger
parent
2173fbcfcd
commit
6d81045bf0
@@ -28,3 +28,11 @@ func TestExtractDocumentLeadingH1(t *testing.T) {
|
||||
|
||||
assert.Equal(t, "a", actual)
|
||||
}
|
||||
|
||||
func TestSetTitleFromFilename(t *testing.T) {
|
||||
t.Run("set title from filename", func(t *testing.T) {
|
||||
meta := &Meta{Title: ""}
|
||||
setTitleFromFilename(meta, "/path/to/test.md")
|
||||
assert.Equal(t, "test", meta.Title)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user