summaryrefslogtreecommitdiff
path: root/test/web/twitter_api/util_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-09-13 17:07:14 +0000
committerlain <lain@soykaf.club>2019-09-13 17:07:14 +0000
commita9b78f55e3561eec3cd125f030d2dd6ec338d406 (patch)
tree68330333ea43a323d5d64be57e52cff5ed1f69f0 /test/web/twitter_api/util_controller_test.exs
parent1be09bde2def0803dd1cea04b67c5df69fda0e41 (diff)
parent25a64a4aa0a10bf06c2ccdf9a6c493f184170a89 (diff)
downloadpleroma-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.exs13
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