1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package job import ( "testing" "time" "github.com/stretchr/testify/assert" ) func TestOptions_DelayDuration(t *testing.T) { opts := &Options{Delay: 0} assert.Equal(t, time.Duration(0), opts.DelayDuration()) } func TestOptions_DelayDuration2(t *testing.T) { opts := &Options{Delay: 1} assert.Equal(t, time.Second, opts.DelayDuration()) }