Skip to content
Permalink
Browse files
Remove compile(tuple_calls) from test/mochiweb_http_tests
  • Loading branch information
etrepum committed Mar 12, 2019
1 parent 58699cb commit 1092472db8b8184f4e1d32babf3f36a080d13cf6
Showing 2 changed files with 8 additions and 6 deletions.
@@ -159,7 +159,7 @@ authorize/request/1 should be called in the loop of project_name_web.erl as per:
loop(Req, DocRoot) ->
Auth = hmac_api_lib:authorize_request(Req),
io:format("Auth is ~p~n", [Auth]),
"/" ++ Path = Req:get(path),
"/" ++ Path = mochiweb_request:get(path, Req),
...

When this is done you are ready to test the api:
@@ -7,8 +7,6 @@
-define(SHOULD_HAVE_BUG, false).
-endif.

-compile(tuple_calls).

has_acceptor_bug_test_() ->
{setup,
fun start_server/0,
@@ -29,9 +27,13 @@ has_acceptor_bug_tests(Server) ->
?_assertEqual(?SHOULD_HAVE_BUG, has_bug(Port, 10000))}].

responder(Req) ->
Req:respond({200,
[{"Content-Type", "text/html"}],
["<html><body>Hello</body></html>"]}).
mochiweb_request:respond(
{
200,
[{"Content-Type", "text/html"}],
["<html><body>Hello</body></html>"]
},
Req).

has_bug(Port, Len) ->
case

0 comments on commit 1092472

Please sign in to comment.