diff options
author | rinpatch <rinpatch@sdf.org> | 2019-11-25 17:19:33 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-11-25 17:19:33 +0300 |
commit | 02f7383891ff0a8dd17f00d6d00ec3495116e38a (patch) | |
tree | 401cbcd0406dc77565a91e832db18922c0ca5da5 /test | |
parent | 9f2993044098ced1585c8886c16da19dd046b5fd (diff) | |
download | pleroma-02f7383891ff0a8dd17f00d6d00ec3495116e38a.tar.gz |
ActivityPub controller: do not render remote users
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index a5414c521..1aa73d75c 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -110,6 +110,19 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do assert json_response(conn, 200) == UserView.render("user.json", %{user: user}) end + + test "it returns 404 for remote users", %{ + conn: conn + } do + user = insert(:user, local: false, nickname: "remoteuser@example.com") + + conn = + conn + |> put_req_header("accept", "application/json") + |> get("/users/#{user.nickname}.json") + + assert json_response(conn, 404) + end end describe "/object/:uuid" do |