More tests

This commit is contained in:
Thomas Citharel
2018-08-24 11:34:00 +02:00
parent a3852f26c1
commit 686cf04787
29 changed files with 945 additions and 241 deletions

View File

@@ -67,11 +67,14 @@ defmodule Eventos.Factory do
end
def comment_factory do
uuid = Ecto.UUID.generate()
%Eventos.Events.Comment{
text: "My Comment",
actor: build(:actor),
event: build(:event),
uuid: Ecto.UUID.generate()
uuid: uuid,
url: "#{EventosWeb.Endpoint.url()}/comments/#{uuid}"
}
end
@@ -86,10 +89,18 @@ defmodule Eventos.Factory do
organizer_actor: actor,
category: build(:category),
physical_address: build(:address),
public: true,
url: "#{EventosWeb.Endpoint.url()}/@#{actor.url}/#{Ecto.UUID.generate()}"
}
end
def participant_factory do
%Eventos.Events.Participant{
event: build(:event),
actor: build(:actor)
}
end
def session_factory do
%Eventos.Events.Session{
title: sequence("MySession"),