photoprism/internal/util/time_test.go

16 lines
306 B
Go
Raw Normal View History

2019-07-17 17:01:53 +02:00
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 took")
}