Closed baoist closed 7 years ago
Ran into the following issues when a html view is rendered in a controller test:
foo_url(Project.Endpoint, :index) # works foo_url(@conn, :index) # Throws the following error: # ** (KeyError) key :phoenix_endpoint not found in: %{phoenix_controller: Project.FooContoller, # phoenix_flash: %{}, phoenix_format: "html", phoenix_recycled: true, phoenix_template: "show.html", # phoenix_view: Project.FooView, plug_session: %{}, plug_session_fetch: :done, plug_session_info: # :write, plug_skip_csrf_protection: true}
I wasn't able to fix this on the test/espec side of things; I had to modify my view.
test/espec
I'm getting the same when running view specs and using the render/2 helper. Phoenix 1.2.
render/2
I verified this against laster espec_phoenix master.
Guys, please check if the issue is actual for 0.5.0
Ran into the following issues when a html view is rendered in a controller test:
I wasn't able to fix this on the
test/espec
side of things; I had to modify my view.