Fork me on GitHub
#duct
<
2018-12-17
>
agile_geek08:12:21

Hey has anyone got an example of how to test a duct handler?

lukas.rychtecky08:12:40

@agile_geek the Duct handler is just a Duct component = a function returned from init-key. Try to genereate a Duct project from template with a test https://github.com/duct-framework/duct/blob/master/lein-template/resources/leiningen/new/duct/example/handler_test.clj#L9

agile_geek08:12:10

@lukas.rychtecky thanks...I literally just figured that out by poking at it in repl but thanks for the link!

👍 4
lukas.rychtecky08:12:01

With that you are able to write e2e tests request->response with ease.