mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 23:54:55 +00:00
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:
@@ -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")))
|
||||
|
||||
Reference in New Issue
Block a user