Skip to content

Commit

Permalink
chore: reproduce invalid 500 error on empty body
Browse files Browse the repository at this point in the history
  • Loading branch information
omerlh committed Jun 11, 2023
1 parent 5b2ef64 commit 6ec657c
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ trait JsonEntitiesFromSchemasTestSuite[
)
}

whenReady(
sendAndDecodeEntityAsText(
request(
s"http://localhost:$port/user/42",
""
)
)
) { case (response, entity) =>
print(response)
assert(response.status.intValue() == 400)
ujson.read(entity) shouldBe ujson.Arr(
ujson.Str("Invalid JSON document")
)
}

// Valid URL and invalid entity (2)
whenReady(
sendAndDecodeEntityAsText(
Expand Down

0 comments on commit 6ec657c

Please sign in to comment.