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/mastodon_api/mastodon_api_controller_test.exs | |
parent | 50269e9cacdbb7834c31fc7ad9872b68977e9f10 (diff) | |
download | pleroma-25a64a4aa0a10bf06c2ccdf9a6c493f184170a89.tar.gz pleroma-25a64a4aa0a10bf06c2ccdf9a6c493f184170a89.zip |
Capture test error messages where appropriate
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 16 |
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 |