From 8d7cbe3cb047a9a796b573061ebf59845303b7fd Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Tue, 16 Jul 2019 13:10:31 +0200 Subject: [PATCH] Add test photoLabel model --- internal/models/photo_label_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 internal/models/photo_label_test.go diff --git a/internal/models/photo_label_test.go b/internal/models/photo_label_test.go new file mode 100644 index 000000000..41189e012 --- /dev/null +++ b/internal/models/photo_label_test.go @@ -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) + }) +}