Skip to content

Commit

Permalink
feat: slurp only when not string
Browse files Browse the repository at this point in the history
Shows correct error in some test failure scenarios
  • Loading branch information
Macroz committed Feb 8, 2019
1 parent 308d998 commit eba3fac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/clj/rems/test/api.clj
Expand Up @@ -30,8 +30,10 @@
(assert response)
(assert (= 200 (:status response))
(pr-str {:status (:status response)
:body (when (:body response)
(slurp (:body response)))}))
:body (when-let [body (:body response)]
(if (string? body)
body
(slurp body)))}))
response)

(defn response-is-unauthorized? [response]
Expand Down

0 comments on commit eba3fac

Please sign in to comment.