summaryrefslogtreecommitdiff
path: root/internal/web/server_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 15:56:28 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 15:56:28 +0200
commitf48b79d8860e4c4616821ceeeea091ab4b838197 (patch)
tree3ee301f93c4df4a44e7d84bff8ece889e69e59e2 /internal/web/server_test.go
parent573aa8bf4677793c6d7da4ef08c79af241aca70e (diff)
downloadlectio-f48b79d8860e4c4616821ceeeea091ab4b838197.tar.gz
lectio-f48b79d8860e4c4616821ceeeea091ab4b838197.zip
bookmarks: per-verse (optional Verse field); web reader verse input + list shows Book Ch:V; v0.17.0
Diffstat (limited to 'internal/web/server_test.go')
-rw-r--r--internal/web/server_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/web/server_test.go b/internal/web/server_test.go
index f6c050b..0754b08 100644
--- a/internal/web/server_test.go
+++ b/internal/web/server_test.go
@@ -606,6 +606,7 @@ func TestBookmarksFlow(t *testing.T) {
form := url.Values{}
form.Set("book", "John")
form.Set("chap", "3")
+ form.Set("verse", "16")
form.Set("note", "for God so loved")
form.Set("tags", "grace, gospel")
post := httptest.NewRequest("POST", "/reader/bookmark", strings.NewReader(form.Encode()))
@@ -620,8 +621,9 @@ func TestBookmarksFlow(t *testing.T) {
list := httptest.NewRecorder()
srv.ServeHTTP(list, httptest.NewRequest("GET", "/bookmarks", nil))
b := list.Body.String()
- if !strings.Contains(b, "John") || !strings.Contains(b, "for God so loved") || !strings.Contains(b, `book=John&chap=3`) {
- t.Errorf("bookmark not listed:\n%s", b)
+ if !strings.Contains(b, "John") || !strings.Contains(b, "for God so loved") ||
+ !strings.Contains(b, `book=John&chap=3`) || !strings.Contains(b, "John 3:16") {
+ t.Errorf("bookmark not listed with verse:\n%s", b)
}
// Tag filter.