Add tests.
This commit is contained in:
parent
11d2287476
commit
8e94936553
@ -281,6 +281,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
|||||||
|> post("/api/v1/accounts/#{other_user.id}/unfollow")
|
|> post("/api/v1/accounts/#{other_user.id}/unfollow")
|
||||||
|
|
||||||
assert %{"id" => id, "following" => false} = json_response(conn, 200)
|
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
|
end
|
||||||
|
|
||||||
test "unimplemented block/mute endpoints" do
|
test "unimplemented block/mute endpoints" do
|
||||||
|
Loading…
Reference in New Issue
Block a user