init pheonix app !

This commit is contained in:
ryan committed 2023-03-29 20:55:14 -07:00
1 parent ba5b72158d
commit e8b77de740
922 files changed
+5250 -1

No files matched your search

@@ -0,0 +1,14 @@
defmodule CiterunWeb.ErrorHTMLTest do
use CiterunWeb.ConnCase, async: true
# Bring render_to_string/4 for testing custom views
import Phoenix.Template
test "renders 404.html" do
assert render_to_string(CiterunWeb.ErrorHTML, "404", "html", []) == "Not Found"
end
test "renders 500.html" do
assert render_to_string(CiterunWeb.ErrorHTML, "500", "html", []) == "Internal Server Error"
end
end
@@ -0,0 +1,12 @@
defmodule CiterunWeb.ErrorJSONTest do
use CiterunWeb.ConnCase, async: true
test "renders 404" do
assert CiterunWeb.ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not Found"}}
end
test "renders 500" do
assert CiterunWeb.ErrorJSON.render("500.json", %{}) ==
%{errors: %{detail: "Internal Server Error"}}
end
end
@@ -0,0 +1,8 @@
defmodule CiterunWeb.PageControllerTest do
use CiterunWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, ~p"/")
assert html_response(conn, 200) =~ "Peace of mind from prototype to production"
end
end