7339e67201
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
15 lines
303 B
Go
15 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 [")
|
|
}
|