Make sure a person profile page returns 404
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -210,8 +210,7 @@ defmodule Mobilizon.Web.Resolvers.GroupTest do
|
||||
|
||||
assert res["data"]["group"] == nil
|
||||
|
||||
assert hd(res["errors"])["message"] ==
|
||||
"Group with name #{@non_existent_username} not found"
|
||||
assert hd(res["errors"])["message"] == "Group not found"
|
||||
end
|
||||
|
||||
test "find_group doesn't list group members access if group is private", %{
|
||||
|
||||
@@ -13,20 +13,30 @@ defmodule Mobilizon.Web.PageControllerTest do
|
||||
{:ok, conn: conn}
|
||||
end
|
||||
|
||||
test "GET /", %{conn: conn} do
|
||||
conn = get(conn, "/")
|
||||
assert html_response(conn, 200)
|
||||
describe "GET /" do
|
||||
test "GET /", %{conn: conn} do
|
||||
conn = get(conn, "/")
|
||||
assert html_response(conn, 200)
|
||||
end
|
||||
end
|
||||
|
||||
test "GET /@actor with existing actor", %{conn: conn} do
|
||||
actor = insert(:actor)
|
||||
conn = get(conn, Actor.build_url(actor.preferred_username, :page))
|
||||
assert html_response(conn, 200) =~ actor.preferred_username
|
||||
end
|
||||
describe "GET /@actor" do
|
||||
test "GET /@actor with existing group", %{conn: conn} do
|
||||
actor = insert(:group)
|
||||
conn = get(conn, Actor.build_url(actor.preferred_username, :page))
|
||||
assert html_response(conn, 200) =~ actor.preferred_username
|
||||
end
|
||||
|
||||
test "GET /@actor with not existing actor", %{conn: conn} do
|
||||
conn = get(conn, Actor.build_url("not_existing", :page))
|
||||
assert html_response(conn, 404)
|
||||
test "GET /@actor with existing person", %{conn: conn} do
|
||||
actor = insert(:actor, visibility: :private)
|
||||
conn = get(conn, Actor.build_url(actor.preferred_username, :page))
|
||||
assert html_response(conn, 404)
|
||||
end
|
||||
|
||||
test "GET /@actor with not existing group", %{conn: conn} do
|
||||
conn = get(conn, Actor.build_url("not_existing", :page))
|
||||
assert html_response(conn, 404)
|
||||
end
|
||||
end
|
||||
|
||||
test "GET /events/:uuid", %{conn: conn} do
|
||||
|
||||
Reference in New Issue
Block a user