summaryrefslogtreecommitdiff
path: root/plugins/jobs/job/job_test.go
blob: 4a95e27d24773e3fac5bbd81a975230707af3a24 (plain)
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())
}