mirror of
https://github.com/penpot/penpot.git
synced 2025-04-10 14:01:29 -05: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]
|
||||
(handler request
|
||||
(fn [response]
|
||||
(prn "wrap-etag" (= (:request-method request) :get))
|
||||
(if (= (:request-method request) :get)
|
||||
(respond (or (handle-response request response) response))
|
||||
(respond response)))
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
:password "user1"
|
||||
:metadata "1"
|
||||
: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})]
|
||||
(println "RESPONSE:" status data)
|
||||
;; (println "RESPONSE:" status data)
|
||||
(t/is (= status 204))))))
|
||||
|
||||
(t/deftest test-http-failed-auth
|
||||
|
@ -42,7 +42,7 @@
|
|||
:password "user2"
|
||||
:metadata "2"
|
||||
: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})]
|
||||
;; (prn "RESPONSE:" status data)
|
||||
(t/is (= 400 status))
|
||||
|
|
Loading…
Add table
Reference in a new issue