Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
624B

  1. defmodule Pleroma.Web.ErrorViewTest do
  2. use Pleroma.Web.ConnCase, async: true
  3. # Bring render/3 and render_to_string/3 for testing custom views
  4. import Phoenix.View
  5. test "renders 404.json" do
  6. assert render(Pleroma.Web.ErrorView, "404.json", []) ==
  7. %{errors: %{detail: "Page not found"}}
  8. end
  9. test "render 500.json" do
  10. assert render(Pleroma.Web.ErrorView, "500.json", []) ==
  11. %{errors: %{detail: "Internal server error"}}
  12. end
  13. test "render any other" do
  14. assert render(Pleroma.Web.ErrorView, "505.json", []) ==
  15. %{errors: %{detail: "Internal server error"}}
  16. end
  17. end