Delete test/plausible_web/views/error_view_test.exs with huggingface_hub
Browse files
test/plausible_web/views/error_view_test.exs
DELETED
|
@@ -1,24 +0,0 @@
|
|
| 1 |
-
defmodule PlausibleWeb.ErrorViewTest do
|
| 2 |
-
use PlausibleWeb.ConnCase, async: false
|
| 3 |
-
|
| 4 |
-
test "renders 500.html", %{conn: conn} do
|
| 5 |
-
conn = get(conn, "/test")
|
| 6 |
-
layout = Application.get_env(:plausible, PlausibleWeb.Endpoint)[:render_errors][:layout]
|
| 7 |
-
|
| 8 |
-
error_html =
|
| 9 |
-
Phoenix.View.render_to_string(PlausibleWeb.ErrorView, "500.html",
|
| 10 |
-
conn: conn,
|
| 11 |
-
layout: layout
|
| 12 |
-
)
|
| 13 |
-
|
| 14 |
-
refute error_html =~ "data-domain="
|
| 15 |
-
end
|
| 16 |
-
|
| 17 |
-
test "renders json errors" do
|
| 18 |
-
assert Phoenix.View.render_to_string(PlausibleWeb.ErrorView, "500.json", %{}) ==
|
| 19 |
-
~s[{"message":"Server error","status":500}]
|
| 20 |
-
|
| 21 |
-
assert Phoenix.View.render_to_string(PlausibleWeb.ErrorView, "406.json", %{}) ==
|
| 22 |
-
~s[{"message":"Not Acceptable","status":406}]
|
| 23 |
-
end
|
| 24 |
-
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|