pet-house/core/server/cron_server/index_test.go

17 lines
335 B
Go

package cron_server
import "testing"
func TestCronInstance(t *testing.T) {
t.Run("Test cron instance init", func(t *testing.T) {
instance := CronInstance()
if instance == nil {
t.Error("Cron Instance init fail.")
}
instance1 := CronInstance()
if instance != instance1 {
t.Error("Cron Instance is change.")
}
})
}