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>
|
||||
<textarea class="w-full min-h-96 font-mono inline-block rounded-lg" readonly>
|
||||
**Status**:
|
||||
`<%= @status %>`
|
||||
`<%= if Map.has_key?(assigns, :status), do: @status, else: "" %>`
|
||||
|
||||
**Reason**:
|
||||
`<%= inspect(@reason) %>`
|
||||
`<%= if Map.has_key?(assigns, :reason), do: inspect(@reason), else: "" %>`
|
||||
|
||||
**Stacktrace**:
|
||||
```
|
||||
<%= Exception.format_stacktrace(@stack) %>
|
||||
<%= if Map.has_key?(assigns, :stack), do: Exception.format_stacktrace(@stack), else: "" %>
|
||||
```
|
||||
</textarea>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ defmodule PinchflatWeb.ErrorHTMLTest do
|
|||
import Phoenix.Template
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue