diff options
author | lain <lain@soykaf.club> | 2019-09-13 17:07:14 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-09-13 17:07:14 +0000 |
commit | a9b78f55e3561eec3cd125f030d2dd6ec338d406 (patch) | |
tree | 68330333ea43a323d5d64be57e52cff5ed1f69f0 /test/web/twitter_api/util_controller_test.exs | |
parent | 1be09bde2def0803dd1cea04b67c5df69fda0e41 (diff) | |
parent | 25a64a4aa0a10bf06c2ccdf9a6c493f184170a89 (diff) | |
download | pleroma-a9b78f55e3561eec3cd125f030d2dd6ec338d406.tar.gz pleroma-a9b78f55e3561eec3cd125f030d2dd6ec338d406.zip |
Merge branch 'capture-test-errors' into 'develop'
Capture test error messages where appropriate
See merge request pleroma/pleroma!1665
Diffstat (limited to 'test/web/twitter_api/util_controller_test.exs')
-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 a3c6145c0..187abf427 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 |