I'm trying to use Plug.Test
to test error handling implemented with Plug.ErrorHandler
-- with assert conn.status == 406
and alike.
I have the defp handle_errors
(containing a single send_resp
statement) and it seems to be called, however, my tests fail with the same exception still (as if handle_errors
has no effect).
A reference to a sample advanced Plug (not Phoenix) app will also be appreciated.
Aucun commentaire:
Enregistrer un commentaire