photoprism/pkg/fs/birthtime_test.go

19 lines
351 B
Go
Raw Normal View History

2021-03-03 15:41:32 +01:00
package fs
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestBirthTime(t *testing.T) {
t.Run("time now", func(t *testing.T) {
result := BirthTime("/testdata/Test.jpg")
assert.NotEmpty(t, result)
})
t.Run("mod time", func(t *testing.T) {
result := BirthTime("./testdata/CATYELLOW.jpg")
assert.NotEmpty(t, result)
})
}