aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-10-18 12:11:25 +0200
committerlain <lain@soykaf.club>2019-10-18 12:11:25 +0200
commit4ec299ea9c1cf45c42e98d7b33f33a72f5e7a9c0 (patch)
tree715f6e88e2790616b3d6ab51686daa99692f69b8 /test
parent203d61b95012fd2cb8a8618f6f51a3748c940cc1 (diff)
downloadpleroma-4ec299ea9c1cf45c42e98d7b33f33a72f5e7a9c0.tar.gz
CommonAPI tests: Capture logs.
Diffstat (limited to 'test')
-rw-r--r--test/web/common_api/common_api_test.exs5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index d46a361c5..63d7ea79f 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -13,6 +13,7 @@ defmodule Pleroma.Web.CommonAPITest do
alias Pleroma.Web.CommonAPI
import Pleroma.Factory
+ import ExUnit.CaptureLog
require Pleroma.Constants
@@ -274,7 +275,9 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"})
{:ok, %Activity{}} = CommonAPI.favorite(user, activity.id)
- {:error, _} = CommonAPI.favorite(user, activity.id)
+ assert capture_log(fn ->
+ assert {:error, _} = CommonAPI.favorite(user, activity.id)
+ end) =~ "[error]"
end
end