Packages

This is a CMS written in Elixir. Aims to be the great open-source ecommerce and/or startup solution for those who are searching for a performance and stability on top of modern technologies like React and Elixir.

Current section

Files

Jump to
lyn test views error_view_test.exs
Raw

test/views/error_view_test.exs

defmodule Lyn.ErrorViewTest do
use Lyn.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(Lyn.ErrorView, "404.html", []) ==
"Page not found"
end
test "render 500.html" do
assert render_to_string(Lyn.ErrorView, "500.html", []) ==
"Server internal error"
end
test "render any other" do
assert render_to_string(Lyn.ErrorView, "505.html", []) ==
"Server internal error"
end
end