Backend: Add tests to internal/entity

This commit is contained in:
Theresa Gresch
2020-05-08 11:46:09 +02:00
parent a136945470
commit dc23632556
6 changed files with 150 additions and 6 deletions

View File

@@ -99,7 +99,7 @@ func TestLabel_Update(t *testing.T) {
})
t.Run("update name and Categories", func(t *testing.T) {
classifyLabel := &classify.Label{Name: "classify", Uncertainty: 30, Source: "manual", Priority: 5}
classifyLabel := &classify.Label{Name: "classify", Uncertainty: 30, Source: "manual", Priority: 5, Categories: []string{"flower", "plant"}}
Label := &Label{LabelName: "label34", LabelSlug: "labelslug2", CustomSlug: "labelslug2", LabelPriority: 5, LabelCategories: []*Label{&LabelFixtureFlower}}
assert.Equal(t, 5, Label.LabelPriority)