PhoenixIntegration.Requests.follow_path
You're seeing just the function
follow_path
, go back to PhoenixIntegration.Requests module for more information.
Similar to a standard get/post/put/patch/delete call in a ConnTest except that
follow_path
follows any redirects returned in the conn's response header.
Unlike the rest of the functions in this module, follow_path
ignores the
conn.resp_body and simply uses the given path.
Parameters
conn
A conn that has been set up to work in the test environment. Could be the conn originally passed in to the test;path
A path that works with your router;opts
A map of additional options:method
- method to use when requesting the path. Defaults to"get"
;:max_redirects
- Maximum number of redirects to follow. Defaults to5
;
Example:
follow_path( conn, thing_path(conn, :index) )
|> assert_response( status: 200, path: think_path(conn, :index) )