diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-10-08 17:24:09 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-10-08 17:24:09 -0500 |
commit | 3f9263fb16ad519d2dd45106549a8ba42b68fc1f (patch) | |
tree | a48eb564f7f037a876a4d2131f8571aa33702b22 /test/web/feed/user_controller_test.exs | |
parent | 24ce9c011caf7401fb261c7df4196b2ef9ba3d90 (diff) | |
parent | 74be4de3f6c2c34447029649526637411acfa9f3 (diff) | |
download | pleroma-3f9263fb16ad519d2dd45106549a8ba42b68fc1f.tar.gz |
Merge remote-tracking branch 'upstream/develop' into restrict-origin
Diffstat (limited to 'test/web/feed/user_controller_test.exs')
-rw-r--r-- | test/web/feed/user_controller_test.exs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/web/feed/user_controller_test.exs b/test/web/feed/user_controller_test.exs index 0d2a61967..9a5610baa 100644 --- a/test/web/feed/user_controller_test.exs +++ b/test/web/feed/user_controller_test.exs @@ -246,4 +246,20 @@ defmodule Pleroma.Web.Feed.UserControllerTest do assert response == ~S({"error":"Not found"}) end end + + describe "private instance" do + setup do: clear_config([:instance, :public]) + + test "returns 404 for user feed", %{conn: conn} do + Config.put([:instance, :public], false) + user = insert(:user) + + {: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 end |