Fix nonexisting user will not generate metadata for search engine opt-out
This commit is contained in:
parent
d2eb4992e2
commit
35bd197733
9 changed files with 26 additions and 4 deletions
|
|
@ -32,7 +32,7 @@ defmodule Pleroma.Web.FallbackTest do
|
|||
resp = get(conn, "/foo")
|
||||
|
||||
assert html_response(resp, 200) =~ "<title>a cool title</title>"
|
||||
refute html_response(resp, 200) =~ "initial-results"
|
||||
assert html_response(resp, 200) =~ "<meta content=\"noindex, noarchive\" name=\"robots\">"
|
||||
end
|
||||
|
||||
test "GET /*path", %{conn: conn} do
|
||||
|
|
|
|||
|
|
@ -147,6 +147,15 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
|
|||
assert response(conn, 404)
|
||||
end
|
||||
|
||||
test "returns noindex meta for missing user", %{conn: conn} do
|
||||
conn =
|
||||
conn
|
||||
|> put_req_header("accept", "text/html")
|
||||
|> get("/users/nonexisting")
|
||||
|
||||
assert html_response(conn, 200) =~ "<meta content=\"noindex, noarchive\" name=\"robots\">"
|
||||
end
|
||||
|
||||
test "returns feed with public and unlisted activities", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue