Backend: Add fixtures for categories
This commit is contained in:
parent
5c86f02106
commit
3127eef80f
1 changed files with 17 additions and 0 deletions
17
internal/entity/category_fixtures.go
Normal file
17
internal/entity/category_fixtures.go
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue