diff options
author | stwf <steven.fuchs@dockyard.com> | 2019-09-13 11:46:41 -0400 |
---|---|---|
committer | stwf <steven.fuchs@dockyard.com> | 2019-09-13 11:46:41 -0400 |
commit | 25a64a4aa0a10bf06c2ccdf9a6c493f184170a89 (patch) | |
tree | e6f256306e7bd68c6dbd67990b5a59210e0b672c /test/web/twitter_api | |
parent | 50269e9cacdbb7834c31fc7ad9872b68977e9f10 (diff) | |
download | pleroma-25a64a4aa0a10bf06c2ccdf9a6c493f184170a89.tar.gz |
Capture test error messages where appropriate
Diffstat (limited to 'test/web/twitter_api')
-rw-r--r-- | test/web/twitter_api/util_controller_test.exs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs index cf8e69d2b..e36d3130f 100644 --- a/test/web/twitter_api/util_controller_test.exs +++ b/test/web/twitter_api/util_controller_test.exs @@ -8,6 +8,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do alias Pleroma.Repo alias Pleroma.User alias Pleroma.Web.CommonAPI + import ExUnit.CaptureLog import Pleroma.Factory import Mock @@ -338,12 +339,14 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do test "show follow page with error when user cannot fecth by `acct` link", %{conn: conn} do user = insert(:user) - response = - conn - |> assign(:user, user) - |> get("/ostatus_subscribe?acct=https://mastodon.social/users/not_found") + assert capture_log(fn -> + response = + conn + |> assign(:user, user) + |> get("/ostatus_subscribe?acct=https://mastodon.social/users/not_found") - assert html_response(response, 200) =~ "Error fetching user" + assert html_response(response, 200) =~ "Error fetching user" + end) =~ "Object has been deleted" end end |