photoprism/internal/util/time_test.go
Michael Mayer dac272468e Sharing: Render preview image & site info
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2019-12-11 14:10:20 +01:00

16 lines
304 B
Go

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