aboutsummaryrefslogtreecommitdiff
path: root/test/views
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2017-01-24 17:09:18 +0100
committerneodarz <neodarz@neodarz.net>2017-01-24 17:09:18 +0100
commit033d07a519bac03fdfd28ca15e09cc287e80fd14 (patch)
treed623a1806c64ad84d7c88b0762ae6eb26ed14ce0 /test/views
downloadthe_transcriber_backend-033d07a519bac03fdfd28ca15e09cc287e80fd14.tar.xz
the_transcriber_backend-033d07a519bac03fdfd28ca15e09cc287e80fd14.zip
Initial commit with non-functional pieces of code about file upload
Diffstat (limited to '')
-rw-r--r--test/views/error_view_test.exs21
-rw-r--r--test/views/layout_view_test.exs3
-rw-r--r--test/views/page_view_test.exs3
3 files changed, 27 insertions, 0 deletions
diff --git a/test/views/error_view_test.exs b/test/views/error_view_test.exs
new file mode 100644
index 0000000..cd5390a
--- /dev/null
+++ b/test/views/error_view_test.exs
@@ -0,0 +1,21 @@
+defmodule TheTranscriberBackend.ErrorViewTest do
+ use TheTranscriberBackend.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(TheTranscriberBackend.ErrorView, "404.html", []) ==
+ "Page not found"
+ end
+
+ test "render 500.html" do
+ assert render_to_string(TheTranscriberBackend.ErrorView, "500.html", []) ==
+ "Internal server error"
+ end
+
+ test "render any other" do
+ assert render_to_string(TheTranscriberBackend.ErrorView, "505.html", []) ==
+ "Internal server error"
+ end
+end
diff --git a/test/views/layout_view_test.exs b/test/views/layout_view_test.exs
new file mode 100644
index 0000000..b060307
--- /dev/null
+++ b/test/views/layout_view_test.exs
@@ -0,0 +1,3 @@
+defmodule TheTranscriberBackend.LayoutViewTest do
+ use TheTranscriberBackend.ConnCase, async: true
+end
diff --git a/test/views/page_view_test.exs b/test/views/page_view_test.exs
new file mode 100644
index 0000000..7aa5589
--- /dev/null
+++ b/test/views/page_view_test.exs
@@ -0,0 +1,3 @@
+defmodule TheTranscriberBackend.PageViewTest do
+ use TheTranscriberBackend.ConnCase, async: true
+end