CommonAPI: Switch to pipeline for following.
This commit is contained in:
parent
172f4aff8e
commit
9dda8b5427
4 changed files with 16 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPITest do
|
|||
follower = insert(:user)
|
||||
user = insert(:user, local: true, deactivated: true)
|
||||
{:error, error} = MastodonAPI.follow(follower, user)
|
||||
assert error == "Could not follow user: #{user.nickname} is deactivated."
|
||||
assert error == :rejected
|
||||
end
|
||||
|
||||
test "following for user" do
|
||||
|
|
|
|||
|
|
@ -372,6 +372,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
user = insert(:user, hide_followers: true, hide_follows: true)
|
||||
other_user = insert(:user)
|
||||
{:ok, user, other_user, _activity} = CommonAPI.follow(user, other_user)
|
||||
|
||||
assert User.following?(user, other_user)
|
||||
assert Pleroma.FollowingRelationship.follower_count(other_user) == 1
|
||||
{:ok, _other_user, user, _activity} = CommonAPI.follow(other_user, user)
|
||||
|
||||
assert %{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue