fix: tests

This commit is contained in:
Tienson Qin
2024-11-29 13:06:48 +08:00
parent cc27407699
commit 665d7a817c
3 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,8 @@
[logseq.db.test.helper :as db-test]
[logseq.db.frontend.rules :as rules]
[logseq.common.util.date-time :as date-time-util]
[logseq.graph-parser.block :as gp-block]))
[logseq.graph-parser.block :as gp-block]
[logseq.db.frontend.content :as db-content]))
;; Helpers
;; =======
@@ -495,7 +496,7 @@
(is (= 2
(->> (find-block-by-content @conn #"replace with same start string")
:block/title
(re-seq #"\[\[~\^\S+\]\]")
(re-seq db-content/id-ref-pattern)
distinct
count))
"A block with ref names that start with same string has 2 distinct refs")
@@ -503,7 +504,7 @@
(is (= 1
(->> (find-block-by-content @conn #"replace case insensitive")
:block/title
(re-seq #"\[\[~\^\S+\]\]")
(re-seq db-content/id-ref-pattern)
distinct
count))
"A block with different case of same ref names has 1 distinct ref"))