error_view_test.exs 439 B

1234567891011121314151617
  1. defmodule EnchufeWeb.ErrorViewTest do
  2. use EnchufeWeb.ConnCase, async: true
  3. # Bring render/3 and render_to_string/3 for testing custom views
  4. import Phoenix.View
  5. test "renders 404.html" do
  6. assert render_to_string(EnchufeWeb.ErrorView, "404.html", []) ==
  7. "Not Found"
  8. end
  9. test "renders 500.html" do
  10. assert render_to_string(EnchufeWeb.ErrorView, "500.html", []) ==
  11. "Internal Server Error"
  12. end
  13. end