Introduce follower, add tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-08-01 14:45:18 +02:00
parent 979aad5acb
commit 115d1d1a3e
15 changed files with 477 additions and 138 deletions

View File

@@ -24,11 +24,28 @@ defmodule Eventos.Factory do
preferred_username: preferred_username,
domain: nil,
keys: pem,
type: :Person,
url: EventosWeb.Endpoint.url() <> "/@#{preferred_username}",
user: nil
}
end
def group_factory do
struct!(
actor_factory(),
%{
type: :Group
}
)
end
def follower_factory do
%Eventos.Actors.Follower{
target_actor: build(:actor),
actor: build(:actor)
}
end
def category_factory do
%Eventos.Events.Category{
title: sequence("MyCategory"),