|
@@ -210,15 +210,30 @@
|
|
|
(let [conn (ldb/start-conn)
|
|
|
properties {"foo" "valid"
|
|
|
"[[foo]]" "invalid"
|
|
|
- "some,prop" "invalid"}]
|
|
|
- (graph-parser/parse-file conn "foo.md" (gp-property/->block-content properties) {})
|
|
|
+ "some,prop" "invalid"}
|
|
|
+ body (str (gp-property/->block-content properties)
|
|
|
+ "\n- " (gp-property/->block-content properties))]
|
|
|
+ (graph-parser/parse-file conn "foo.md" body {})
|
|
|
|
|
|
(is (= [{:block/properties {:foo "valid"}
|
|
|
:block/invalid-properties #{"[[foo]]" "some,prop"}}]
|
|
|
(->> (d/q '[:find (pull ?b [*])
|
|
|
:in $
|
|
|
- :where [?b :block/properties] [(missing? $ ?b :block/name)]]
|
|
|
+ :where
|
|
|
+ [?b :block/properties]
|
|
|
+ [(missing? $ ?b :block/pre-block?)]
|
|
|
+ [(missing? $ ?b :block/name)]]
|
|
|
@conn)
|
|
|
(map first)
|
|
|
(map #(select-keys % [:block/properties :block/invalid-properties]))))
|
|
|
- "Has correct (in)valid block properties")))
|
|
|
+ "Has correct (in)valid block properties")
|
|
|
+
|
|
|
+ (is (= [{:block/properties {:foo "valid"}
|
|
|
+ :block/invalid-properties #{"[[foo]]" "some,prop"}}]
|
|
|
+ (->> (d/q '[:find (pull ?b [*])
|
|
|
+ :in $
|
|
|
+ :where [?b :block/properties] [?b :block/name]]
|
|
|
+ @conn)
|
|
|
+ (map first)
|
|
|
+ (map #(select-keys % [:block/properties :block/invalid-properties]))))
|
|
|
+ "Has correct (in)valid page properties")))
|