   (testing "Two clause (with match)"
     (let [request {:uri "/user/1234/permissions/"}]
       (is (= "ID: 1234"
-            (:body (->uri request
+            (:body (c/->uri request
                      "/user/:id/profile/:type/" [id type] {:status 200
                                                            :body (format "ID: %s, Type: %s" id type)}
                      "/user/:id/permissions/"   [id]      {:status 200

(ns calfpath.core-test
  (:require [clojure.test :refer :all]
            [calfpath.core :refer :all]))


(deftest test-->uri
  (testing "No clause"
    (let [request {:uri "/user/1234/profile/compact/"}]
      (is (= 400
            (:status (->uri request))))))
  (testing "One clause (no match)"
    (let [request {:uri "/hello/1234/"}]
      (is (= 400
            (:status (->uri request
                       "/user/:id/profile/:type/" [id type] (do {:status 200
                                                                 :body (format "ID: %s, Type: %s" id type)})))))))
  (testing "One clause (with match)"
    (let [request {:uri "/user/1234/profile/compact/"}]
      (is (= "ID: 1234, Type: compact"
            (:body (->uri request
                     "/user/:id/profile/:type/" [id type] {:status 200
                                                           :body (format "ID: %s, Type: %s" id type)}))))))
  (testing "Two clauses (no match)"
    (let [request {:uri "/hello/1234/"}]
      (is (= 400
            (:status (->uri request
                       "/user/:id/profile/:type/" [id type] {:status 200
                                                             :body (format "ID: %s, Type: %s" id type)}
                       "/user/:id/permissions/"   [id]      {:status 200

  (testing "Two clauses (no match, custom default)"
    (let [request {:uri "/hello/1234/"}]
      (is (= 404
            (:status (c/->uri request
                       "/user/:id/profile/:type/" [id type] {:status 200
                                                             :body (format "ID: %s, Type: %s" id type)}
                       "/user/:id/permissions/"   [id]      {:status 200
