From 3ee77e95b2496b253ebd37a24dce7fdfa7a9c550 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 20 Feb 2019 17:23:05 +0000 Subject: [PATCH] tests: fix tests --- test/web/views/error_view_test.exs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/web/views/error_view_test.exs b/test/web/views/error_view_test.exs index 16a0c8cef..d529fd2c3 100644 --- a/test/web/views/error_view_test.exs +++ b/test/web/views/error_view_test.exs @@ -14,11 +14,16 @@ defmodule Pleroma.Web.ErrorViewTest do test "render 500.json" do assert render(Pleroma.Web.ErrorView, "500.json", []) == - %{errors: %{detail: "Internal server error"}} + %{errors: %{detail: "Internal server error", reason: "nil"}} end test "render any other" do 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 -- 2.45.2