Skip to content

Commit

Permalink
Merge pull request #163 from mtsbarbosa/improve-unit-test-docs
Browse files Browse the repository at this point in the history
#161 Add form params example to unit test docs
  • Loading branch information
hlship authored Nov 4, 2022
2 parents 9e32add + 35c22a0 commit 831e0ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions content/reference/unit-testing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ appropriate value based on the payload format of the request body.
:headers {"Content-Type" "application/json"}
:body "{\"foo\":\"bar\"}"))))
----
[source,clojure]
----
(is (= 200 (:status (response-for service
:post "/foo-login"
:headers {"Content-Type" "application/x-www-form-urlencoded"}
:body "username=test@test.com&password=my-pwd"))))
----

Notice how `Content-Type` is a string.

Expand Down

0 comments on commit 831e0ba

Please sign in to comment.