summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/mastodon_api_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/mastodon_api/mastodon_api_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/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index f4902d043..806ae7e69 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -3963,13 +3963,15 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
Config.put([:suggestions, :enabled], true)
Config.put([:suggestions, :third_party_engine], "http://test500?{{host}}&{{user}}")
- res =
- conn
- |> assign(:user, user)
- |> get("/api/v1/suggestions")
- |> json_response(500)
-
- assert res == "Something went wrong"
+ assert capture_log(fn ->
+ res =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/suggestions")
+ |> json_response(500)
+
+ assert res == "Something went wrong"
+ end) =~ "Could not retrieve suggestions"
end
test "returns suggestions", %{conn: conn, user: user, other_user: other_user} do