Add /api/v1/pleroma/outgoing_follow_requests
Signed-off-by: mkljczk <git@mkljczk.pl> Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
138ead9856
commit
e458bd953a
7 changed files with 99 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2024 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.PleromaAPI.FollowRequestControllerTest do
|
||||
use Pleroma.Web.ConnCase, async: true
|
||||
|
||||
alias Pleroma.Web.CommonAPI
|
||||
|
||||
import Pleroma.Factory
|
||||
|
||||
test "/api/v1/pleroma/outgoing_follow_requests works" do
|
||||
%{conn: conn, user: user} = oauth_access(["read:follows"])
|
||||
|
||||
other_user1 = insert(:user)
|
||||
other_user2 = insert(:user, is_locked: true)
|
||||
_other_user3 = insert(:user)
|
||||
|
||||
{:ok, _, _, _} = CommonAPI.follow(other_user1, user)
|
||||
{:ok, _, _, _} = CommonAPI.follow(other_user2, user)
|
||||
|
||||
conn = get(conn, "/api/v1/pleroma/outgoing_follow_requests")
|
||||
|
||||
assert [relationship] = json_response_and_validate_schema(conn, 200)
|
||||
assert to_string(other_user2.id) == relationship["id"]
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue