|
|
@@ -527,22 +527,7 @@ tags:: tag1, tag2
|
|
|
@conn)
|
|
|
ffirst)]
|
|
|
(is (nil? (:block/tags updated-page))
|
|
|
- "Page's tags are deleted")))
|
|
|
-
|
|
|
- ;; FIXME:
|
|
|
- (testing "save deletes orphaned pages when a block's refs change"
|
|
|
- (let [conn (db/get-db test-db false)
|
|
|
- pages (set (map first (d/q '[:find ?bn :where [?b :block/name ?bn]] @conn)))
|
|
|
- _ (assert (set/subset? #{"blarg" "bar"} pages) "Pages from block exist")
|
|
|
- block-with-refs (ffirst (d/q '[:find (pull ?b [* {:block/refs [*]}])
|
|
|
- :where [?b :block/title "block #blarg #bar"]]
|
|
|
- @conn))
|
|
|
- _ (save-block! (-> block-with-refs
|
|
|
- (assoc :block/title "block"
|
|
|
- :block/refs [])))
|
|
|
- updated-pages (set (map first (d/q '[:find ?bn :where [?b :block/name ?bn]] @conn)))]
|
|
|
- (is (not (contains? updated-pages "blarg"))
|
|
|
- "Deleted, orphaned page no longer exists"))))
|
|
|
+ "Page's tags are deleted"))))
|
|
|
|
|
|
;;; Fuzzy tests
|
|
|
|