mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-25 15:39:19 +00:00
parent
6a6260f64e
commit
429407ba0a
|
@ -776,6 +776,21 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
assert Enum.member?(activities, activity_one)
|
||||
end
|
||||
|
||||
test "doesn't return activities from deactivated users" do
|
||||
_user = insert(:user)
|
||||
deactivated = insert(:user)
|
||||
active = insert(:user)
|
||||
{:ok, activity_one} = CommonAPI.post(deactivated, %{status: "hey!"})
|
||||
{:ok, activity_two} = CommonAPI.post(active, %{status: "yay!"})
|
||||
{:ok, _updated_user} = User.set_activation(deactivated, false)
|
||||
|
||||
activities = ActivityPub.fetch_activities([], %{})
|
||||
|
||||
refute Enum.member?(activities, activity_one)
|
||||
assert Enum.member?(activities, activity_two)
|
||||
end
|
||||
|
||||
|
||||
test "always see your own posts even when they address people you block" do
|
||||
user = insert(:user)
|
||||
blockee = insert(:user)
|
||||
|
|
Loading…
Reference in a new issue