diff options
author | lain <lain@soykaf.club> | 2020-07-08 15:40:56 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-08 15:40:56 +0200 |
commit | 9dda8b542723afae8dd5493b4082b8524873a14d (patch) | |
tree | ff7e9ba1be64a08c3c3993567e2edfdaa89031dd /test | |
parent | 172f4aff8ef573c54902dc8fa135d69f50fea47c (diff) | |
download | pleroma-9dda8b542723afae8dd5493b4082b8524873a14d.tar.gz pleroma-9dda8b542723afae8dd5493b4082b8524873a14d.zip |
CommonAPI: Switch to pipeline for following.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_test.exs | 2 | ||||
-rw-r--r-- | test/web/mastodon_api/views/account_view_test.exs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_test.exs b/test/web/mastodon_api/mastodon_api_test.exs index a7f9c5205..c08be37d4 100644 --- a/test/web/mastodon_api/mastodon_api_test.exs +++ b/test/web/mastodon_api/mastodon_api_test.exs @@ -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 diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs index 80b1f734c..3e2e780e3 100644 --- a/test/web/mastodon_api/views/account_view_test.exs +++ b/test/web/mastodon_api/views/account_view_test.exs @@ -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 %{ |