From 0a5fadc60bc586946ebd3b17839bcaf13b76f6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 13 Aug 2018 17:23:48 +0200 Subject: Improve errors for when the ProvideCallback is missing --- test/handlers/provide_callback_missing_h.erl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/handlers/provide_callback_missing_h.erl (limited to 'test/handlers/provide_callback_missing_h.erl') diff --git a/test/handlers/provide_callback_missing_h.erl b/test/handlers/provide_callback_missing_h.erl new file mode 100644 index 0000000..c9419ad --- /dev/null +++ b/test/handlers/provide_callback_missing_h.erl @@ -0,0 +1,11 @@ +-module(provide_callback_missing_h). + +-export([init/2]). +-export([content_types_provided/2]). + +init(Req, State) -> + {cowboy_rest, Req, State}. + +content_types_provided(Req, State) -> + ct_helper_error_h:ignore(cowboy_rest, set_resp_body, 2), + {[{<<"text/plain">>, provide}], Req, State}. -- cgit v1.2.3