mirror of
https://github.com/iflamed/schedule.git
synced 2025-12-24 12:38:01 +08:00
18 lines
286 B
Go
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)
|
|
}
|