photoprism/internal/util/time_test.go
Michael Mayer 7339e67201 Backend: Fix profiling timer test
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2019-12-03 13:21:41 +01:00

16 lines
303 B
Go

package util
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
"time"
)
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 [")
}