Add unfollowing to TwAPI.
This commit is contained in:
parent
75e51b190d
commit
30650e5bc6
7 changed files with 75 additions and 1 deletions
|
|
@ -51,4 +51,15 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
|
|||
|
||||
assert user.following == [User.ap_followers(following)]
|
||||
end
|
||||
|
||||
test "Unfollow another user" do
|
||||
{ :ok, following } = UserBuilder.insert(%{nickname: "guy"})
|
||||
{ :ok, user } = UserBuilder.insert(%{following: [User.ap_followers(following)]})
|
||||
|
||||
{:ok, user, _following } = TwitterAPI.unfollow(user, following.id)
|
||||
|
||||
user = Repo.get(User, user.id)
|
||||
|
||||
assert user.following == []
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue