Add test photoLabel model
This commit is contained in:
parent
d2c9b73a38
commit
8d7cbe3cb0
1 changed files with 16 additions and 0 deletions
16
internal/models/photo_label_test.go
Normal file
16
internal/models/photo_label_test.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewPhotoLabel(t *testing.T) {
|
||||
t.Run("name Christmas 2018", func(t *testing.T) {
|
||||
photoLabel := NewPhotoLabel(1, 3, 80, "source")
|
||||
assert.Equal(t, uint(0x1), photoLabel.PhotoID)
|
||||
assert.Equal(t, uint(0x3), photoLabel.LabelID)
|
||||
assert.Equal(t, 80, photoLabel.LabelUncertainty)
|
||||
assert.Equal(t, "source", photoLabel.LabelSource)
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue