2020-05-01 13:10:20 +02:00
|
|
|
package entity
|
|
|
|
|
|
|
|
var CategoryFixtures = map[string]Category{
|
2020-05-10 19:43:49 +02:00
|
|
|
"flower_landscape": {
|
2020-05-01 13:10:20 +02:00
|
|
|
LabelID: 1000001,
|
2020-05-10 19:43:49 +02:00
|
|
|
Label: LabelFixtures.Pointer("flower"),
|
2020-05-01 13:10:20 +02:00
|
|
|
CategoryID: 1000000,
|
2020-05-10 19:43:49 +02:00
|
|
|
Category: LabelFixtures.Pointer("landscape"),
|
2020-05-01 13:10:20 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreateCategoryFixtures inserts known entities into the database for testing.
|
|
|
|
func CreateCategoryFixtures() {
|
2020-05-10 19:43:49 +02:00
|
|
|
for _, entity := range CategoryFixtures {
|
2020-05-01 13:10:20 +02:00
|
|
|
Db().Create(&entity)
|
|
|
|
}
|
|
|
|
}
|