summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2019-07-20 16:41:58 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2019-07-20 16:41:58 +0300
commit8292331b35f088a19a4d14eff69b74a6d1ed4746 (patch)
tree3a4f85b315f299b59c36cbdb3f8830a4923c11da /test/web/mastodon_api
parentae4fc58589ac48a0853719e6f83b2559b6de44fb (diff)
parentfe548f322e834c7c81678a460c54c71f1198021c (diff)
downloadpleroma-8292331b35f088a19a4d14eff69b74a6d1ed4746.tar.gz
pleroma-8292331b35f088a19a4d14eff69b74a6d1ed4746.zip
Merge branch 'develop' into feature/digest-email
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r--test/web/mastodon_api/search_controller_test.exs34
1 files changed, 20 insertions, 14 deletions
diff --git a/test/web/mastodon_api/search_controller_test.exs b/test/web/mastodon_api/search_controller_test.exs
index 9f50c09f4..043b96c14 100644
--- a/test/web/mastodon_api/search_controller_test.exs
+++ b/test/web/mastodon_api/search_controller_test.exs
@@ -24,12 +24,16 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
{Pleroma.User, [], [search: fn _q, _o -> raise "Oops" end]},
{Pleroma.Activity, [], [search: fn _u, _q, _o -> raise "Oops" end]}
] do
- conn = get(conn, "/api/v2/search", %{"q" => "2hu"})
-
- assert results = json_response(conn, 200)
-
- assert results["accounts"] == []
- assert results["statuses"] == []
+ capture_log(fn ->
+ results =
+ conn
+ |> get("/api/v2/search", %{"q" => "2hu"})
+ |> json_response(200)
+
+ assert results["accounts"] == []
+ assert results["statuses"] == []
+ end) =~
+ "[error] Elixir.Pleroma.Web.MastodonAPI.SearchController search error: %RuntimeError{message: \"Oops\"}"
end
end
@@ -99,14 +103,16 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
{Pleroma.User, [], [search: fn _q, _o -> raise "Oops" end]},
{Pleroma.Activity, [], [search: fn _u, _q, _o -> raise "Oops" end]}
] do
- conn =
- conn
- |> get("/api/v1/search", %{"q" => "2hu"})
-
- assert results = json_response(conn, 200)
-
- assert results["accounts"] == []
- assert results["statuses"] == []
+ capture_log(fn ->
+ results =
+ conn
+ |> get("/api/v1/search", %{"q" => "2hu"})
+ |> json_response(200)
+
+ assert results["accounts"] == []
+ assert results["statuses"] == []
+ end) =~
+ "[error] Elixir.Pleroma.Web.MastodonAPI.SearchController search error: %RuntimeError{message: \"Oops\"}"
end
end