Update actor_controller_test.exs

This commit is contained in:
Mirai Kumiko 2025-06-19 08:14:59 +02:00
parent d8e66d0dcb
commit d8b4d01e37
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278

View file

@ -34,12 +34,12 @@ defmodule NullaWeb.ActorControllerTest do
:ok :ok
end end
describe "GET /@username" do describe "GET /users/username" do
test "renders ActivityPub JSON if Accept header is activity+json", %{conn: conn} do test "renders ActivityPub JSON if Accept header is activity+json", %{conn: conn} do
conn = conn =
conn conn
|> put_req_header("accept", "application/activity+json") |> put_req_header("accept", "application/activity+json")
|> get(~p"/@test") |> get(~p"/users/test")
assert response = json_response(conn, 200) assert response = json_response(conn, 200)
@ -72,7 +72,7 @@ defmodule NullaWeb.ActorControllerTest do
end end
test "renders HTML if Accept header is regular", %{conn: conn} do test "renders HTML if Accept header is regular", %{conn: conn} do
conn = get(conn, ~p"/@test") conn = get(conn, ~p"/users/test")
assert html_response(conn, 200) =~ "test" assert html_response(conn, 200) =~ "test"
assert html_response(conn, 200) =~ "Test" assert html_response(conn, 200) =~ "Test"
@ -80,7 +80,7 @@ defmodule NullaWeb.ActorControllerTest do
end end
test "returns 404 if actor not found", %{conn: conn} do test "returns 404 if actor not found", %{conn: conn} do
conn = get(conn, ~p"/@nonexistent") conn = get(conn, ~p"/users/nonexistent")
assert json_response(conn, 404)["error"] == "Not Found" assert json_response(conn, 404)["error"] == "Not Found"
end end