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
|
alias Pleroma.Web.CommonAPI
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
import ExUnit.CaptureLog
|
||||||
|
|
||||||
require Pleroma.Constants
|
require Pleroma.Constants
|
||||||
|
|
||||||
@ -274,7 +275,9 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||||||
|
|
||||||
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"})
|
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"})
|
||||||
{:ok, %Activity{}} = CommonAPI.favorite(user, activity.id)
|
{: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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user