 (deftest queries-with-links
   (and (is (= (-> '[[current-user _]]
                   q/conform-and-parse om/query)
-              '[[:current-user '_]]))
+              '[[:current-user _]]))
        (is (= (-> '[[user 123]]
                   q/conform-and-parse om/query)
               '[[:user 123]]))


(deftest parse-join-child-props
  (and (is (= (q/conform-and-parse '[foo [{bar Baz}]])
              '[{:name foo/bar :type :join :join-target Baz}]))
       (is    (= (q/conform-and-parse '[foo [{bar Baz} {baz Ruux}]])
                 '[{:name foo/bar :type :join :join-target Baz}
                   {:name foo/baz :type :join :join-target Ruux}]))
       (is (= (q/conform-and-parse '[foo [{bar ...}]])
              '[{:name foo/bar :type :join :join-target ...}]))
       (is (= (q/conform-and-parse '[foo [{bar 5}]])
              '[{:name foo/bar :type :join :join-target 5}]))))

(deftest parse-link-child-props
  (and (is (= (q/conform-and-parse '[foo [[bar _]]])


(deftest parse-one-join
  (and (is (= (q/conform-and-parse '[{foo ...}])
              '[{:name foo
                 :type :join
                 :join-source {:name foo :type :property}
                 :join-target ...}]))
       (is (= (q/conform-and-parse '[{bar User}])
              '[{:name bar
                 :type :join
                 :join-source {:name bar :type :property}
                 :join-target User}]))
       (is (= (q/conform-and-parse '[{baz 5}])
              '[{:name baz
                 :type :join
                 :join-source {:name baz :type :property}
                 :join-target 5}]))
       (is (= (q/conform-and-parse '[{[foo _] [bar baz]}])
              '[{:name foo
                 :type :join
                 :join-source {:name foo :type :link :link-id _}
                 :join-target [{:name bar :type :property}
                               {:name baz :type :property}]}]))))

(deftest parse-three-joins
  (and (is (= (q/conform-and-parse '[{foo ...}
                         {bar User}
                         {baz 5}])
              '[{:name foo
                 :type :join
                 :join-source {:name foo :type :property}
                 :join-target ...}
                {:name bar
                 :type :join
                 :join-source {:name bar :type :property}
                 :join-target User}
                {:name baz
                 :type :join
                 :join-source {:name baz :type :property}
                 :join-target 5}]))))

(deftest parse-basic-child-props
  (and (is (= (q/conform-and-parse '[foo [bar]])
