Files: Update new file form test #464

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-03-20 16:41:23 +01:00
parent 9ad86ac017
commit 824e2accef

View file

@ -9,9 +9,9 @@ import (
func TestNewFile(t *testing.T) {
t.Run("Orientation", func(t *testing.T) {
var file = struct {
Orientation int
FileOrientation int
}{
Orientation: 3,
FileOrientation: 3,
}
frm, err := NewFile(file)
@ -20,6 +20,10 @@ func TestNewFile(t *testing.T) {
t.Fatal(err)
}
assert.Equal(t, 3, frm.Orientation)
assert.Equal(t, 3, frm.FileOrientation)
assert.Equal(t, 3, frm.Orientation())
frm.FileOrientation = 10
assert.Equal(t, 10, frm.FileOrientation)
assert.Equal(t, 0, frm.Orientation())
})
}