mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
tests: fix tests
This commit is contained in:
parent
8b08096436
commit
3ee77e95b2
1 changed files with 7 additions and 2 deletions
|
@ -14,11 +14,16 @@ defmodule Pleroma.Web.ErrorViewTest do
|
||||||
|
|
||||||
test "render 500.json" do
|
test "render 500.json" do
|
||||||
assert render(Pleroma.Web.ErrorView, "500.json", []) ==
|
assert render(Pleroma.Web.ErrorView, "500.json", []) ==
|
||||||
%{errors: %{detail: "Internal server error"}}
|
%{errors: %{detail: "Internal server error", reason: "nil"}}
|
||||||
end
|
end
|
||||||
|
|
||||||
test "render any other" do
|
test "render any other" do
|
||||||
assert render(Pleroma.Web.ErrorView, "505.json", []) ==
|
assert render(Pleroma.Web.ErrorView, "505.json", []) ==
|
||||||
%{errors: %{detail: "Internal server error"}}
|
%{errors: %{detail: "Internal server error", reason: "nil"}}
|
||||||
|
end
|
||||||
|
|
||||||
|
test "render 500.json with reason" do
|
||||||
|
assert render(Pleroma.Web.ErrorView, "500.json", reason: "test reason") ==
|
||||||
|
%{errors: %{detail: "Internal server error", reason: "\"test reason\""}}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue