Update actor_controller_test.exs
This commit is contained in:
parent
d8e66d0dcb
commit
d8b4d01e37
1 changed files with 4 additions and 4 deletions
|
@ -34,12 +34,12 @@ defmodule NullaWeb.ActorControllerTest do
|
|||
:ok
|
||||
end
|
||||
|
||||
describe "GET /@username" do
|
||||
describe "GET /users/username" do
|
||||
test "renders ActivityPub JSON if Accept header is activity+json", %{conn: conn} do
|
||||
conn =
|
||||
conn
|
||||
|> put_req_header("accept", "application/activity+json")
|
||||
|> get(~p"/@test")
|
||||
|> get(~p"/users/test")
|
||||
|
||||
assert response = json_response(conn, 200)
|
||||
|
||||
|
@ -72,7 +72,7 @@ defmodule NullaWeb.ActorControllerTest do
|
|||
end
|
||||
|
||||
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"
|
||||
|
@ -80,7 +80,7 @@ defmodule NullaWeb.ActorControllerTest do
|
|||
end
|
||||
|
||||
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"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue