duct

agile_geek 2018-12-17T08:03:21.024800Z

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

lukas.rychtecky 2018-12-17T08:07:40.026Z

@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_geek 2018-12-17T08:09:10.027300Z

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

1👍
lukas.rychtecky 2018-12-17T08:10:01.028Z

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