Merge branch 'fix/activity-expirations-again' into 'develop'
Fix activity expirations again See merge request pleroma/pleroma!2866
This commit is contained in:
commit
14a06e63f6
8 changed files with 76 additions and 5 deletions
|
|
@ -19,8 +19,9 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
|
|||
alias Pleroma.Web.ActivityPub.SideEffects
|
||||
alias Pleroma.Web.CommonAPI
|
||||
|
||||
import Pleroma.Factory
|
||||
import ExUnit.CaptureLog
|
||||
import Mock
|
||||
import Pleroma.Factory
|
||||
|
||||
describe "handle_after_transaction" do
|
||||
test "it streams out notifications and streams" do
|
||||
|
|
@ -221,6 +222,22 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
|
|||
|
||||
assert User.get_cached_by_ap_id(user.ap_id).deactivated
|
||||
end
|
||||
|
||||
test "it logs issues with objects deletion", %{
|
||||
delete: delete,
|
||||
object: object
|
||||
} do
|
||||
{:ok, object} =
|
||||
object
|
||||
|> Object.change(%{data: Map.delete(object.data, "actor")})
|
||||
|> Repo.update()
|
||||
|
||||
Object.invalid_object_cache(object)
|
||||
|
||||
assert capture_log(fn ->
|
||||
{:error, :no_object_actor} = SideEffects.handle(delete)
|
||||
end) =~ "object doesn't have an actor"
|
||||
end
|
||||
end
|
||||
|
||||
describe "EmojiReact objects" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue