antonmi / espec_phoenix

ESpec for Phoenix web framework.
MIT License
138 stars 33 forks source link

Question: Authentications headers on testing.. #7

Closed erneestoc closed 9 years ago

erneestoc commented 9 years ago

How can I send auth header to test secure routes? Another question would be.. Is it possible to use the Phoenix.Token.sign function from the before block to sign users in?

antonmi commented 9 years ago

Excuse me for not having answered. Did you find a solution?

erneestoc commented 9 years ago

Sure, I used Plug.Conn.put_req_header to add the secure token to my test request. It has nothing to do with espec.

antonmi commented 9 years ago

:thumbsup: