photoprism/pkg/fs/birthtime_test.go

19 lines
351 B
Go
Raw Normal View History

2021-03-03 14:41:32 +00: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)
})
}