fix: test cleanup for 2c23731b5d

Remove assertion that is no longer valid and remove
property filtering for a test that is no longer needed
This commit is contained in:
Gabriel Horner
2024-11-15 16:01:09 -05:00
parent 18eb5aaae5
commit bb133c4eba
2 changed files with 4 additions and 15 deletions

View File

@@ -133,13 +133,6 @@
_ (gp-exporter/export-doc-files conn files' <read-file doc-options)]
{:import-state (:import-state doc-options)}))
(defn- remove-block-ns-properties
[m]
(->> (remove (fn [[k _v]]
(and (= "block" (namespace k))
(not (contains? #{:block/tags :block/alias} k)))) m)
(into {})))
(defn- readable-properties
[db query-ent]
(->> (db-property/properties query-ent)
@@ -154,8 +147,7 @@
(db-property/ref->property-value-contents db v)
v))
(db-property/ref->property-value-contents db v))])))
(into {})
(remove-block-ns-properties)))
(into {})))
;; Tests
;; =====
@@ -254,9 +246,8 @@
(is (= {:user.property/prop-bool true
:user.property/prop-num 5
:user.property/prop-string "woot"}
(->> (update-vals (db-property/properties (find-block-by-content @conn "b1"))
(fn [v] (if (map? v) (db-property/ref->property-value-content @conn v) v)))
(remove-block-ns-properties)))
(update-vals (db-property/properties (find-block-by-content @conn "b1"))
(fn [v] (if (map? v) (db-property/ref->property-value-content @conn v) v))))
"Basic block has correct properties")
(is (= #{"prop-num" "prop-string" "prop-bool"}
(->> (d/entity @conn (:db/id (find-block-by-content @conn "b1")))