2020-01-06 15:22:46 +01:00
|
|
|
package capture
|
2019-07-17 17:01:53 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
"time"
|
2019-12-11 14:10:20 +01:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
2019-07-17 17:01:53 +02:00
|
|
|
)
|
|
|
|
|
2020-01-06 15:22:46 +01:00
|
|
|
func TestTime(t *testing.T) {
|
2019-07-17 17:01:53 +02:00
|
|
|
start := time.Now()
|
|
|
|
time.Sleep(1 * time.Millisecond)
|
2020-01-12 14:25:58 +01:00
|
|
|
result := Time(start, fmt.Sprintf("%s", "Successful test"))
|
|
|
|
assert.Contains(t, result, "Successful test [")
|
2019-07-17 17:01:53 +02:00
|
|
|
}
|