Improve tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-02-22 18:07:20 +01:00
parent d73f738b1b
commit 8bba35e60b
7 changed files with 131 additions and 26 deletions

View File

@@ -6,17 +6,6 @@ defmodule MobilizonWeb.Resolvers.Person do
alias Mobilizon.Actors.{Actor, User}
alias Mobilizon.Service.ActivityPub
@deprecated "Use find_person/3 or find_group/3 instead"
def find_actor(_parent, %{preferred_username: name}, _resolution) do
case ActivityPub.find_or_make_actor_from_nickname(name) do
{:ok, actor} ->
{:ok, actor}
_ ->
{:error, "Actor with name #{name} not found"}
end
end
@doc """
Find a person
"""
@@ -65,6 +54,13 @@ defmodule MobilizonWeb.Resolvers.Person do
end
end
@doc """
This function is used to create more identities from an existing user
"""
def create_person(_parent, _args, _resolution) do
{:error, "You need to be logged-in to create a new identity"}
end
@doc """
This function is used to register a person afterwards the user has been created (but not activated)
"""