diff options
author | lambda <pleromagit@rogerbraun.net> | 2017-10-28 14:25:34 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2017-10-28 14:25:34 +0000 |
commit | 353b66e4326c27aca4a81ee133b73454d5eb0853 (patch) | |
tree | a376acab415bb79a7c251cd337aa01825e3af30e /test | |
parent | ab2d4503e720ffd2d004edd5ce67176cd4256a81 (diff) | |
parent | 8e94936553c978e5f0d3bb802a1932a6b505f86e (diff) | |
download | pleroma-353b66e4326c27aca4a81ee133b73454d5eb0853.tar.gz pleroma-353b66e4326c27aca4a81ee133b73454d5eb0853.zip |
Merge branch 'missing-mastodon-follow-endpoint' into 'develop'
Add missing mastodon follow endpoint.
See merge request pleroma/pleroma!2
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 56888140d..af2351706 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -281,6 +281,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> post("/api/v1/accounts/#{other_user.id}/unfollow") assert %{"id" => id, "following" => false} = json_response(conn, 200) + + user = Repo.get(User, user.id) + conn = build_conn() + |> assign(:user, user) + |> post("/api/v1/follows", %{"uri" => other_user.nickname}) + + assert %{"id" => id, "following" => true} = json_response(conn, 200) end test "unimplemented block/mute endpoints" do |