photoprism/internal/capture/time_test.go
Michael Mayer f6d4e62ea8 Backend: Split up "util" package
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-01-06 15:22:46 +01:00

16 lines
293 B
Go

package capture
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestTime(t *testing.T) {
start := time.Now()
time.Sleep(1 * time.Millisecond)
Time(start, fmt.Sprintf("%s", "Successful test"))
assert.Contains(t, logBuffer.String(), "Successful test [")
}