photoprism/pkg/capture/time_test.go

17 lines
291 B
Go
Raw Normal View History

package capture
2019-07-17 17:01:53 +02:00
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
2019-07-17 17:01:53 +02:00
)
func TestTime(t *testing.T) {
2019-07-17 17:01:53 +02:00
start := time.Now()
time.Sleep(1 * time.Millisecond)
result := Time(start, fmt.Sprintf("%s", "Successful test"))
assert.Contains(t, result, "Successful test [")
2019-07-17 17:01:53 +02:00
}