[#3053] No auth check in StaticFEController, even on non-federating instances. Adjusted tests.
This commit is contained in:
parent
0d575735bf
commit
f6024252ae
9 changed files with 162 additions and 134 deletions
|
|
@ -13,7 +13,7 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
|
|||
alias Pleroma.User
|
||||
alias Pleroma.Web.CommonAPI
|
||||
|
||||
setup do: clear_config([:instance, :federating], true)
|
||||
setup do: clear_config([:static_fe, :enabled], false)
|
||||
|
||||
describe "feed" do
|
||||
setup do: clear_config([:feed])
|
||||
|
|
@ -192,6 +192,16 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
|
|||
|> get(user_feed_path(conn, :feed, user.nickname))
|
||||
|> response(404)
|
||||
end
|
||||
|
||||
test "does not require authentication on non-federating instances", %{conn: conn} do
|
||||
clear_config([:instance, :federating], false)
|
||||
user = insert(:user)
|
||||
|
||||
conn
|
||||
|> put_req_header("accept", "application/rss+xml")
|
||||
|> get("/users/#{user.nickname}/feed.rss")
|
||||
|> response(200)
|
||||
end
|
||||
end
|
||||
|
||||
# Note: see ActivityPubControllerTest for JSON format tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue