Redirect /users/:nickname.rss to /users/:nickname/feed.rss instead of .atom
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
8f9a139ba1
commit
50e3cc67fc
3 changed files with 21 additions and 2 deletions
|
|
@ -282,6 +282,21 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
|
|||
"#{Pleroma.Web.Endpoint.url()}/users/#{user.nickname}/feed.atom"
|
||||
end
|
||||
|
||||
test "redirects to rss feed when explicitly requested", %{conn: conn} do
|
||||
note_activity = insert(:note_activity)
|
||||
user = User.get_cached_by_ap_id(note_activity.data["actor"])
|
||||
|
||||
conn =
|
||||
conn
|
||||
|> put_req_header("accept", "application/xml")
|
||||
|> get("/users/#{user.nickname}.rss")
|
||||
|
||||
assert conn.status == 302
|
||||
|
||||
assert redirected_to(conn) ==
|
||||
"#{Pleroma.Web.Endpoint.url()}/users/#{user.nickname}/feed.rss"
|
||||
end
|
||||
|
||||
test "with non-html / non-json format, it returns error when user is not found", %{conn: conn} do
|
||||
response =
|
||||
conn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue