fixed tests
This commit is contained in:
parent
3f7f36724c
commit
e1fd4eceb0
2 changed files with 5 additions and 5 deletions
|
|
@ -16,14 +16,14 @@
|
||||||
</ul>
|
</ul>
|
||||||
<textarea class="w-full min-h-96 font-mono inline-block rounded-lg" readonly>
|
<textarea class="w-full min-h-96 font-mono inline-block rounded-lg" readonly>
|
||||||
**Status**:
|
**Status**:
|
||||||
`<%= @status %>`
|
`<%= if Map.has_key?(assigns, :status), do: @status, else: "" %>`
|
||||||
|
|
||||||
**Reason**:
|
**Reason**:
|
||||||
`<%= inspect(@reason) %>`
|
`<%= if Map.has_key?(assigns, :reason), do: inspect(@reason), else: "" %>`
|
||||||
|
|
||||||
**Stacktrace**:
|
**Stacktrace**:
|
||||||
```
|
```
|
||||||
<%= Exception.format_stacktrace(@stack) %>
|
<%= if Map.has_key?(assigns, :stack), do: Exception.format_stacktrace(@stack), else: "" %>
|
||||||
```
|
```
|
||||||
</textarea>
|
</textarea>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ defmodule PinchflatWeb.ErrorHTMLTest do
|
||||||
import Phoenix.Template
|
import Phoenix.Template
|
||||||
|
|
||||||
test "renders 404.html" do
|
test "renders 404.html" do
|
||||||
assert render_to_string(PinchflatWeb.ErrorHTML, "404", "html", []) == "Not Found"
|
assert render_to_string(PinchflatWeb.ErrorHTML, "404", "html", []) =~ "404 (not found)"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "renders 500.html" do
|
test "renders 500.html" do
|
||||||
assert render_to_string(PinchflatWeb.ErrorHTML, "500", "html", []) == "Internal Server Error"
|
assert render_to_string(PinchflatWeb.ErrorHTML, "500", "html", []) =~ "Internal Server Error"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue