photoprism/internal/util/time_test.go

17 lines
304 B
Go
Raw Normal View History

2019-07-17 17:01:53 +02:00
package util
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
2019-07-17 17:01:53 +02:00
)
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 [")
2019-07-17 17:01:53 +02:00
}