mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 16:26:44 +02:00
fix(backend): fix auth tests
This commit is contained in:
parent
31766fde32
commit
48d5188aaa
2 changed files with 3 additions and 4 deletions
|
@ -45,7 +45,6 @@
|
||||||
(fn [request respond raise]
|
(fn [request respond raise]
|
||||||
(handler request
|
(handler request
|
||||||
(fn [response]
|
(fn [response]
|
||||||
(prn "wrap-etag" (= (:request-method request) :get))
|
|
||||||
(if (= (:request-method request) :get)
|
(if (= (:request-method request) :get)
|
||||||
(respond (or (handle-response request response) response))
|
(respond (or (handle-response request response) response))
|
||||||
(respond response)))
|
(respond response)))
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
:password "user1"
|
:password "user1"
|
||||||
:metadata "1"
|
:metadata "1"
|
||||||
:scope "foobar"}
|
:scope "foobar"}
|
||||||
uri (str th/+base-url+ "/auth/login")
|
uri (str th/+base-url+ "/api/auth/login")
|
||||||
[status data] (th/http-post uri {:body data})]
|
[status data] (th/http-post uri {:body data})]
|
||||||
(println "RESPONSE:" status data)
|
;; (println "RESPONSE:" status data)
|
||||||
(t/is (= status 204))))))
|
(t/is (= status 204))))))
|
||||||
|
|
||||||
(t/deftest test-http-failed-auth
|
(t/deftest test-http-failed-auth
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
:password "user2"
|
:password "user2"
|
||||||
:metadata "2"
|
:metadata "2"
|
||||||
:scope "foobar"}
|
:scope "foobar"}
|
||||||
uri (str th/+base-url+ "/auth/login")
|
uri (str th/+base-url+ "/api/auth/login")
|
||||||
[status data] (th/http-post uri {:body data})]
|
[status data] (th/http-post uri {:body data})]
|
||||||
;; (prn "RESPONSE:" status data)
|
;; (prn "RESPONSE:" status data)
|
||||||
(t/is (= 400 status))
|
(t/is (= 400 status))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue