diff options
author | lain <lain@soykaf.club> | 2019-10-18 12:11:25 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-10-18 12:11:25 +0200 |
commit | 4ec299ea9c1cf45c42e98d7b33f33a72f5e7a9c0 (patch) | |
tree | 715f6e88e2790616b3d6ab51686daa99692f69b8 /test | |
parent | 203d61b95012fd2cb8a8618f6f51a3748c940cc1 (diff) | |
download | pleroma-4ec299ea9c1cf45c42e98d7b33f33a72f5e7a9c0.tar.gz |
CommonAPI tests: Capture logs.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 5 |
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 |