mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
fix(backend): fix auth tests
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user