summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-04-22 18:51:59 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-04-22 18:51:59 +0300
commit0062116e07446beea13768d122e5bcb19c60dde7 (patch)
tree2c050be2e440364824680fdff3c4499daf118dee /test/web/mastodon_api/controllers/account_controller_test.exs
parent2958a7d246f40141a88bcb7bdd6a477c4f65f0bc (diff)
parent28f8fcf8b034223209ec451d0c2c836124ec93f4 (diff)
downloadpleroma-0062116e07446beea13768d122e5bcb19c60dde7.tar.gz
pleroma-0062116e07446beea13768d122e5bcb19c60dde7.zip
Merge remote-tracking branch 'remotes/origin/develop' into automatic-authentication-and-instance-publicity-checks
# Conflicts: # lib/pleroma/web/mastodon_api/controllers/account_controller.ex
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/account_controller_test.exs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
index 61c2697b2..8c428efee 100644
--- a/test/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -681,17 +681,17 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
test "following / unfollowing errors", %{user: user, conn: conn} do
# self follow
conn_res = post(conn, "/api/v1/accounts/#{user.id}/follow")
- assert %{"error" => "Record not found"} = json_response(conn_res, 404)
+ assert %{"error" => "Can not follow yourself"} = json_response(conn_res, 400)
# self unfollow
user = User.get_cached_by_id(user.id)
conn_res = post(conn, "/api/v1/accounts/#{user.id}/unfollow")
- assert %{"error" => "Record not found"} = json_response(conn_res, 404)
+ assert %{"error" => "Can not unfollow yourself"} = json_response(conn_res, 400)
# self follow via uri
user = User.get_cached_by_id(user.id)
conn_res = post(conn, "/api/v1/follows", %{"uri" => user.nickname})
- assert %{"error" => "Record not found"} = json_response(conn_res, 404)
+ assert %{"error" => "Can not follow yourself"} = json_response(conn_res, 400)
# follow non existing user
conn_res = post(conn, "/api/v1/accounts/doesntexist/follow")