Helper for calling your Elli callback in unit tests.
Authors: Andreas Hasselberg (andreas.hasselberg@gmail.com
).
Only the callback specified is actually run. Elli's response handling is not used, so the headers will for example not include a content length and the return format is not standardized. The unit tests below test elli_example_callback
.
call/5 |
call(Method, Path, Headers, Body, Opts) -> elli_handler:result()
Method = elli:http_method()
Path = binary()
Headers = elli:headers()
Body = elli:body()
Opts = proplists:proplist()