Last active
August 29, 2015 14:25
-
-
Save dadair-ca/fa06e6885b109c7a7035 to your computer and use it in GitHub Desktop.
Ring-mock BufferedInputStream coersion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(testing "Access should be granted on valid credentials." | |
(is (= (app (mock/header (mock/request :get "/api/echo" {:m "hi"}) | |
"authorization" "Basic Zm9vOmJhcg==")) | |
{:status 200 :body "hi"})))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The response's body is always returned as a:
How can I have it return simply as the string "hi"? The BufferedInputStream isn't very human-readable if I was to include it in the test...