Skip to content

Commit 34916eb

Browse files
committed
Added test to verify patch method behavior.
1 parent 6a42bc2 commit 34916eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/ring/middleware/apigw_test.clj

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
(GET "/get" request {:status 200 :body "get"})
2121
(OPTIONS "/options" request {:status 200 :body "options"})
2222
(POST "/post" request {:status 200 :body "post"})
23+
(PATCH "/patch" request {:status 200 :body "patch"})
2324
(PUT "/put" request {:status 200 :body "put"})
2425
(DELETE "/delete" request {:status 200 :body "delete"})
2526
(route/not-found {:status 404 :body {:errors "Route not found"}}))
@@ -88,6 +89,10 @@
8889
(is (= {:statusCode 200 :headers {} :body "post"}
8990
(app (->apigw-request "POST" "/post")))))
9091

92+
(testing "PATCH"
93+
(is (= {:statusCode 200 :headers {} :body "patch"}
94+
(app (->apigw-request "PATCH" "/patch")))))
95+
9196
(testing "PUT"
9297
(is (= {:statusCode 200 :headers {} :body "put"}
9398
(app (->apigw-request "PUT" "/put")))))

0 commit comments

Comments
 (0)