0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Move some more tests out of the old HTTP test suite

This commit is contained in:
Loïc Hoguin 2018-11-21 13:28:20 +01:00
parent 112ff607a1
commit dc52ebe440
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
3 changed files with 29 additions and 31 deletions

View file

@ -611,6 +611,16 @@ status_code_404(Config) ->
{response, _, 404, _} = gun:await(ConnPid, Ref),
ok.
status_code_404_not_found(Config) ->
doc("The 404 Not Found status code is sent when the target "
"resource does not exist. (RFC7231 6.5.4)"),
ConnPid = gun_open(Config),
Ref = gun:get(ConnPid, "/not/found", [
{<<"accept-encoding">>, <<"gzip">>}
]),
{response, _, 404, _} = gun:await(ConnPid, Ref),
ok.
status_code_405(Config) ->
doc("The 405 Method Not Allowed status code can be sent. (RFC7231 6.5.5)"),
ConnPid = gun_open(Config),