Packages

Arke project generator. Provides a `mix arke.new` task to bootstrap a new Elixir application with Arke dependencies.

Current section

Files

Jump to
arke_new templates starter_test views error_view_test.exs
Raw

templates/starter_test/views/error_view_test.exs

defmodule <%= @arke_ns %>.ErrorViewTest do
use <%= @arke_ns %>.ConnCase, async: true
# Bring render_to_string/4 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render_to_string(<%= @arke_ns %>.ErrorView, "404.json", []) == %{errors: %{detail: "Not Found"}}
end
test "renders 500.json" do
assert render_to_string(<%= @arke_ns %>.ErrorView, "500.json", []) ==
%{errors: %{detail: "Internal Server Error"}}
end
end