This commit is contained in:
Justin Hawkins 2025-05-04 11:47:18 +09:30
parent 0dccd9f0f0
commit b50a2aefb6

22
entity/bookmark_test.go Normal file
View File

@ -0,0 +1,22 @@
package entity
import (
"testing"
)
func TestTitle(t *testing.T) {
bm := Bookmark{
URL: "http://example.org",
Info: PageInfo{
Title: "",
},
}
if bm.DisplayTitle() != "http://example.org" {
t.Errorf("title incorrect - got %s", bm.DisplayTitle())
}
bm.Info.Title = "Example Site"
if bm.DisplayTitle() != "Example Site" {
t.Errorf("title incorrect - got %s", bm.DisplayTitle())
}
}