Skip to content
Snippets Groups Projects
Commit cc04cd95 authored by Cam Saul's avatar Cam Saul
Browse files

test fix

parent 23f907f2
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@
(execute-query 1)
(expect 1)
(expect-eval-actual-first 1)
(expect-expansion 0)
(expect-let 1)
(ins 1)
(let-400 1)
......
......@@ -377,7 +377,8 @@
- executes BODY inside a `try-catch` block that handles `ApiExceptions`
- automatically calls `wrap-response-if-needed` on the result of BODY
- tags function's metadata in a way that subsequent calls to `define-routes` (see below)
will automatically include the function in the generated `defroutes` form."
will automatically include the function in the generated `defroutes` form.
- Generates a super-sophisticated Markdown-formatted docstring"
{:arglists '([method route docstr? args annotations-map? & body])}
[method route & more]
{:pre [(or (string? route)
......
......@@ -142,16 +142,14 @@
;; replace regex `#"[0-9]+"` with str `"#[0-9]+" so expectations doesn't barf
(binding [*auto-parse-types* (update-in *auto-parse-types* [:int :route-param-regex] (partial str "#"))]
(expect-expansion
(do
(def GET_:id
(GET ["/:id" :id "#[0-9]+"] [id]
(metabase.api.common.internal/catch-api-exceptions
(metabase.api.common.internal/auto-parse [id]
(metabase.api.common.internal/let-annotated-args
{id Required}
(clojure.core/-> (do (->404 (sel :one Card :id id)))
metabase.api.common.internal/wrap-response-if-needed))))))
(clojure.core/alter-meta! #'GET_:id clojure.core/assoc :is-endpoint? true))
(defendpoint GET "/:id" [id]
{id Required}
(->404 (sel :one Card :id id)))))
(def GET_:id
(GET ["/:id" :id "#[0-9]+"] [id]
(metabase.api.common.internal/catch-api-exceptions
(metabase.api.common.internal/auto-parse [id]
(metabase.api.common.internal/let-annotated-args
{id Required}
(clojure.core/-> (do (->404 (sel :one Card :id id)))
metabase.api.common.internal/wrap-response-if-needed))))))
(defendpoint GET "/:id" [id]
{id Required}
(->404 (sel :one Card :id id)))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment