Files
schedule/task_test.go
2022-10-05 19:58:47 +08:00

18 lines
286 B
Go

// Package schedule
package schedule
import (
"context"
"github.com/stretchr/testify/assert"
"testing"
)
func TestDefaultTask_Run(t *testing.T) {
var mark bool
d := NewDefaultTask(func(ctx context.Context) {
mark = true
})
d.Run(context.Background())
assert.True(t, mark)
}