Add categories properly

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-01-15 12:04:09 +01:00
parent 9df9a795c7
commit 8b4d1ab4e4
6 changed files with 23 additions and 13 deletions

View File

@@ -25,6 +25,13 @@ defmodule Eventos.Factory do
}
end
def category_factory do
%Eventos.Events.Category{
title: sequence("MyCategory"),
description: "My category desc"
}
end
def event_factory do
%Eventos.Events.Event{
title: sequence("MyEvent"),
@@ -32,7 +39,8 @@ defmodule Eventos.Factory do
description: "My desc",
begins_on: nil,
ends_on: nil,
organizer: build(:account)
organizer: build(:account),
category: build(:category)
}
end