X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fweb%2Factivity_pub%2Futils_test.exs;h=62dc02f61fe66105445ea62ac3c7c4bf5857e940;hb=2caade10dfc6ca06d55b90768c57012d56c776ed;hp=ee3e1014e29e1d550ad40a8b76ffca7077e8f8ca;hpb=b221d77a6da07c684bdbc63ddf4500e0d7ffeae8;p=akkoma diff --git a/test/pleroma/web/activity_pub/utils_test.exs b/test/pleroma/web/activity_pub/utils_test.exs index ee3e1014e..62dc02f61 100644 --- a/test/pleroma/web/activity_pub/utils_test.exs +++ b/test/pleroma/web/activity_pub/utils_test.exs @@ -213,6 +213,20 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do assert refresh_record(follow_activity).data["state"] == "accept" assert refresh_record(follow_activity_two).data["state"] == "accept" end + + test "also updates the state of accepted follows" do + user = insert(:user) + follower = insert(:user) + + {:ok, _, _, follow_activity} = CommonAPI.follow(follower, user) + {:ok, _, _, follow_activity_two} = CommonAPI.follow(follower, user) + + {:ok, follow_activity_two} = + Utils.update_follow_state_for_all(follow_activity_two, "reject") + + assert refresh_record(follow_activity).data["state"] == "reject" + assert refresh_record(follow_activity_two).data["state"] == "reject" + end end describe "update_follow_state/2" do