mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 16:24:23 +00:00
CommonAPI tests: Capture logs.
This commit is contained in:
parent
203d61b950
commit
4ec299ea9c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue