Add OpenAPI spec for MarkerController
[akkoma] / test / web / common_api / common_api_test.exs
index c6ccc02c4a4e58daf18cc2685413530d4c52da13..bc0c1a7912506ef768a1f3cc94e74a330c5433bd 100644 (file)
@@ -697,6 +697,14 @@ defmodule Pleroma.Web.CommonAPITest do
       assert Repo.get(Activity, follow_activity_two.id).data["state"] == "reject"
       assert Repo.get(Activity, follow_activity_three.id).data["state"] == "pending"
     end
+
+    test "doesn't create a following relationship if the corresponding follow request doesn't exist" do
+      user = insert(:user, locked: true)
+      not_follower = insert(:user)
+      CommonAPI.accept_follow_request(not_follower, user)
+
+      assert Pleroma.FollowingRelationship.following?(not_follower, user) == false
+    end
   end
 
   describe "vote/3" do