Add adresses

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-01-17 11:39:01 +01:00
parent bfcdc38076
commit 07382d6aca
19 changed files with 551 additions and 42 deletions

View File

@@ -32,6 +32,19 @@ defmodule Eventos.Factory do
}
end
def address_factory do
%Eventos.Addresses.Address{
description: sequence("MyAddress"),
geom: %Geo.Point{coordinates: {30, -90}, srid: 4326},
floor: "Myfloor",
addressCountry: "My Country",
addressLocality: "My Locality",
addressRegion: "My Region",
postalCode: "My Postal Code",
streetAddress: "My Street Address"
}
end
def event_factory do
%Eventos.Events.Event{
title: sequence("MyEvent"),
@@ -40,7 +53,8 @@ defmodule Eventos.Factory do
begins_on: nil,
ends_on: nil,
organizer_account: build(:account),
category: build(:category)
category: build(:category),
address: build(:address)
}
end
@@ -58,4 +72,15 @@ defmodule Eventos.Factory do
event: build(:event)
}
end
def group_factory do
%Eventos.Groups.Group{
title: sequence("My Group"),
description: "My group",
suspended: false,
url: "https://",
uri: "https://",
address: build(:address)
}
end
end