Backend: Add fixtures for categories

This commit is contained in:
Theresa Gresch 2020-05-01 13:10:20 +02:00
parent 5c86f02106
commit 3127eef80f

View file

@ -0,0 +1,17 @@
package entity
var CategoryFixtures = map[string]Category{
"1": {
LabelID: 1000001,
CategoryID: 1000000,
Label: &LabelFixtureFlower,
Category: &LabelFixtureLandscape,
},
}
// CreateCategoryFixtures inserts known entities into the database for testing.
func CreateCategoryFixtures() {
for _, entity := range KeywordFixtures {
Db().Create(&entity)
}
}