You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
299 B
Go
15 lines
299 B
Go
package conf
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestCheckedDuration(t *testing.T) {
|
|
assert.Equal(t, time.Second, CheckedDuration(1000))
|
|
assert.Equal(t, 2*time.Second, CheckedDuration(2000))
|
|
assert.Equal(t, 2*time.Second, CheckedDuration(time.Second*2))
|
|
}
|