Add Follow activity insertion

This commit is contained in:
dtluna 2017-04-04 03:30:07 +03:00
commit 8075badafe
4 changed files with 12 additions and 5 deletions

View file

@ -107,11 +107,13 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
{ :ok, user } = UserBuilder.insert
{ :ok, following } = UserBuilder.insert(%{nickname: "guy"})
{:ok, user, following } = TwitterAPI.follow(user, following.id)
{:ok, user, following, activity } = TwitterAPI.follow(user, following.id)
user = Repo.get(User, user.id)
follow = Repo.get(Activity, activity.id)
assert user.following == [User.ap_followers(following)]
assert follow == activity
end
test "Unfollow another user" do