21 lines
502 B
Go
21 lines
502 B
Go
package config
|
|
|
|
import "testing"
|
|
|
|
func TestDefaultHostSalaryCronTasksAreEnabled(t *testing.T) {
|
|
cfg := Default()
|
|
for _, name := range []string{
|
|
"host_salary_daily_settlement",
|
|
"host_salary_half_month_settlement",
|
|
"host_salary_month_end",
|
|
} {
|
|
task, ok := cfg.Tasks[name]
|
|
if !ok {
|
|
t.Fatalf("host salary cron task %s missing", name)
|
|
}
|
|
if !task.Enabled {
|
|
t.Fatalf("host salary cron task %s should be enabled globally; policy settlement_mode decides who is processed", name)
|
|
}
|
|
}
|
|
}
|