fix: db graph test using :build/tags

This commit is contained in:
Gabriel Horner
2024-06-06 17:47:18 -04:00
parent 516192fa92
commit fd8bd1e3f2
2 changed files with 25 additions and 25 deletions

View File

@@ -359,20 +359,14 @@ prop-d:: nada"}])
; (dsl-query "(or (priority a) (not (priority c)))")))
)
(deftest page-tags-and-all-page-tags-queries
(deftest ^:done page-tags-and-all-page-tags-queries
(load-test-files
[{:file/path "pages/page1.md"
:file/content "---
tags: [[page-tag-1]], [[page-tag-2]]
---"}
:file/content "tags:: [[page-tag-1]], [[page-tag-2]]"}
{:file/path "pages/page2.md"
:file/content "---
tags: [[page-tag-2]], [[page-tag-3]]
---"}
:file/content "tags:: [[page-tag-2]], [[page-tag-3]]"}
{:file/path "pages/page3.md"
:file/content "---
tags: [[other]]
---"}])
:file/content "tags:: [[other]]"}])
(are [x y] (= (set y) (set (map :block/name (dsl-query x))))
@@ -590,10 +584,11 @@ created-at:: 1608968448116
result)
"sorted-by asc")))
(testing "user page property rating"
(is (= [10 8]
(->> (dsl-query "(and (page-property rating) (sort-by rating))")
(map #(get-property-value % :rating))))))))
;; FIXME: Once :number property approach resolved
#_(testing "user page property rating"
(is (= [10 8]
(->> (dsl-query "(and (page-property rating) (sort-by rating))")
(map #(get-property-value % :rating))))))))
(deftest ^:done simplify-query
(are [x y] (= (query-dsl/simplify-query x) y)