Two test failures
snoyberg opened this issue · comments
Just encountered these via Stackage:
1) GET / has Content-Type: text/plain
missing header:
Content-Type: text/plain
the actual headers were:
Content-Type: text/plain; charset=utf-8
2) GET /some-json responds with some JSON
missing header:
Content-Type: application/json
the actual headers were:
Content-Type: application/json; charset=utf-8
scotty-0.9.0
now includes the charset
. This is the correct thing to do, but it breaks the example. I think we want the json
matcher to accept both application/json
and application/json; charset=utf-8
as Content-Type
. I'm looking into it.
For now I've adapted the example (ad2ba64) and released to Hackage as 0.3.0.1
. Extending the matchers is somewhat more work (my wip is on https://github.com/hspec/hspec-wai/tree/improve-header-matching).
Cool, thanks!