about summary refs log tree commit diff
path: root/test/guard_web/views/error_view_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/guard_web/views/error_view_test.exs')
-rw-r--r--test/guard_web/views/error_view_test.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/guard_web/views/error_view_test.exs b/test/guard_web/views/error_view_test.exs
new file mode 100644
index 0000000..6ec5f1c
--- /dev/null
+++ b/test/guard_web/views/error_view_test.exs
@@ -0,0 +1,14 @@
+defmodule RookWeb.ErrorViewTest do
+  use RookWeb.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(RookWeb.ErrorView, "404.html", []) == "Not Found"
+  end
+
+  test "renders 500.html" do
+    assert render_to_string(RookWeb.ErrorView, "500.html", []) == "Internal Server Error"
+  end
+end