Add async/sync test to check that a bad HTTP verb is rejected
This commit is contained in:
parent
e71c5b8434
commit
41836a72ad
2 changed files with 11 additions and 1 deletions
|
@ -109,6 +109,11 @@
|
|||
(let [response (common/make-request client "http://localhost:10000/hello/" :get)]
|
||||
(is (= 200 (:status @response)))
|
||||
(is (= "Hello, World!" (slurp (:body @response))))))
|
||||
(testing "Bad verb request via request function with persistent async client"
|
||||
(is (thrown? IllegalArgumentException
|
||||
(common/make-request client
|
||||
"http://localhost:10000/hello/"
|
||||
:bad))))
|
||||
(testing "client closes properly"
|
||||
(common/close client)
|
||||
(is (thrown? IllegalStateException
|
||||
|
|
|
@ -166,6 +166,11 @@
|
|||
(let [response (common/make-request client "http://localhost:10000/hello/" :get)]
|
||||
(is (= 200 (:status response)))
|
||||
(is (= "Hello, World!" (slurp (:body response))))))
|
||||
(testing "Bad verb request via request function with persistent sync client"
|
||||
(is (thrown? IllegalArgumentException
|
||||
(common/make-request client
|
||||
"http://localhost:10000/hello/"
|
||||
:bad))))
|
||||
(testing "client closes properly"
|
||||
(common/close client)
|
||||
(is (thrown? IllegalStateException
|
||||
|
|
Loading…
Reference in a new issue