aboutsummaryrefslogtreecommitdiffstats
path: root/test/rfc7231_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-21 13:28:20 +0100
committerLoïc Hoguin <[email protected]>2018-11-21 13:28:20 +0100
commitdc52ebe4407ac917bbac127a9feae756b44ef940 (patch)
tree94e75887252eb214708a69533d09dbba4413f2ee /test/rfc7231_SUITE.erl
parent112ff607a10519004cbad5ffa0db6450a406b202 (diff)
downloadcowboy-dc52ebe4407ac917bbac127a9feae756b44ef940.tar.gz
cowboy-dc52ebe4407ac917bbac127a9feae756b44ef940.tar.bz2
cowboy-dc52ebe4407ac917bbac127a9feae756b44ef940.zip
Move some more tests out of the old HTTP test suite
Diffstat (limited to 'test/rfc7231_SUITE.erl')
-rw-r--r--test/rfc7231_SUITE.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rfc7231_SUITE.erl b/test/rfc7231_SUITE.erl
index 642429b..89ec7b4 100644
--- a/test/rfc7231_SUITE.erl
+++ b/test/rfc7231_SUITE.erl
@@ -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),