People: Revert marker form and test #22

This commit is contained in:
Michael Mayer 2021-08-16 01:52:02 +02:00
parent 003982afe0
commit c315c58bb5
2 changed files with 22 additions and 22 deletions

View file

@ -10,7 +10,7 @@ type Marker struct {
SubjectUID string `json:"SubjectUID"`
SubjectSrc string `json:"SubjectSrc"`
Score int `json:"Score"`
Invalid bool `json:"Invalid"`
MarkerInvalid bool `json:"Invalid"`
}
func NewMarker(m interface{}) (f Marker, err error) {

View file

@ -15,7 +15,7 @@ func TestNewMarker(t *testing.T) {
SubjectUID string
SubjectSrc string
Score int
Invalid bool
MarkerInvalid bool
}{
MarkerType: "face",
MarkerSrc: "image",
@ -23,7 +23,7 @@ func TestNewMarker(t *testing.T) {
SubjectUID: "3h59wvth837b5vyiub35",
SubjectSrc: "meta",
Score: 100,
Invalid: true,
MarkerInvalid: true,
}
f, err := NewMarker(m)
@ -38,6 +38,6 @@ func TestNewMarker(t *testing.T) {
assert.Equal(t, "3h59wvth837b5vyiub35", f.SubjectUID)
assert.Equal(t, "meta", f.SubjectSrc)
assert.Equal(t, 100, f.Score)
assert.Equal(t, true, f.Invalid)
assert.Equal(t, true, f.MarkerInvalid)
})
}