summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-07-29 14:02:02 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-07-29 14:02:02 +0200
commit2e27847573e91946e6777f9aa18b9cf9ccaf820d (patch)
tree860e4ec687d21ff60ab6905d84845cdd97089a3b /test
parent93dbba9b8a5aacbbf43a45a07e27b328579eabf8 (diff)
downloadpleroma-2e27847573e91946e6777f9aa18b9cf9ccaf820d.tar.gz
pleroma-2e27847573e91946e6777f9aa18b9cf9ccaf820d.zip
feed/user_controller: Return 404 when the user is remote
Diffstat (limited to 'test')
-rw-r--r--test/web/feed/user_controller_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/feed/user_controller_test.exs b/test/web/feed/user_controller_test.exs
index fa2ed1ea5..0d2a61967 100644
--- a/test/web/feed/user_controller_test.exs
+++ b/test/web/feed/user_controller_test.exs
@@ -181,6 +181,17 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
assert activity_titles == ['public', 'unlisted']
end
+
+ test "returns 404 when the user is remote", %{conn: conn} do
+ user = insert(:user, local: false)
+
+ {:ok, _} = CommonAPI.post(user, %{status: "test"})
+
+ assert conn
+ |> put_req_header("accept", "application/atom+xml")
+ |> get(user_feed_path(conn, :feed, user.nickname))
+ |> response(404)
+ end
end
# Note: see ActivityPubControllerTest for JSON format tests