summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-10-11 22:34:28 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-10-11 22:34:28 +0300
commit89c595b772eaaa8809f5339d708d7dc22e51b662 (patch)
tree885a0de9778137c1af3355854a4a8deb8555516e /test
parente1eb54d3899883b5af6a43687a2345543d69ad4a (diff)
downloadpleroma-89c595b772eaaa8809f5339d708d7dc22e51b662.tar.gz
pleroma-89c595b772eaaa8809f5339d708d7dc22e51b662.zip
[#3053] Removed target accessibility checks for OStatus endpoints delegating to RedirectController. Added tests.
Diffstat (limited to 'test')
-rw-r--r--test/web/static_fe/static_fe_controller_test.exs23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/web/static_fe/static_fe_controller_test.exs b/test/web/static_fe/static_fe_controller_test.exs
index bab0b0a7b..8baf5b1ce 100644
--- a/test/web/static_fe/static_fe_controller_test.exs
+++ b/test/web/static_fe/static_fe_controller_test.exs
@@ -78,6 +78,18 @@ defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do
assert html_response(conn, 200) =~ user.nickname
end
+
+ test "returns 404 for local user with `restrict_unauthenticated/profiles/local` setting", %{
+ conn: conn
+ } do
+ clear_config([:restrict_unauthenticated, :profiles, :local], true)
+
+ local_user = insert(:user, local: true)
+
+ conn
+ |> get("/users/#{local_user.nickname}")
+ |> html_response(404)
+ end
end
describe "notice html" do
@@ -200,5 +212,16 @@ defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do
assert html_response(conn, 200) =~ "testing a thing!"
end
+
+ test "returns 404 for local public activity with `restrict_unauthenticated/activities/local` setting",
+ %{conn: conn, user: user} do
+ clear_config([:restrict_unauthenticated, :activities, :local], true)
+
+ {:ok, activity} = CommonAPI.post(user, %{status: "testing a thing!"})
+
+ conn
+ |> get("/notice/#{activity.id}")
+ |> html_response(404)
+ end
end
end