I'm having a lot of difficulties with treating controller methods as though they are in a vacuum. I end up having to build up my own conn for every controller_spec file, making manual calls to several methods in Phoenix.Controller and Plug.Conn; often times in a very strict order.
If I make the following request, I expect to see
"a_params"
inconn.params
:However, I see:
This even fails when I manually attempt to fetch the params with:
Because the params aren't yet passed to the action.
Accessing
conn.params
inplug
s appears how the guides access params in plugs (http://www.phoenixframework.org/docs/understanding-plug#section-function-plugs), so I'm not quite sure what else to do.I'm having a lot of difficulties with treating controller methods as though they are in a vacuum. I end up having to build up my own
conn
for everycontroller_spec
file, making manual calls to several methods inPhoenix.Controller
andPlug.Conn
; often times in a very strict order.