1
0
mirror of https://github.com/nxshock/gron.git synced 2024-11-27 03:41:00 +05:00
gron/job_test.go

23 lines
409 B
Go
Raw Normal View History

2022-03-26 13:23:39 +05:00
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestReadJob(t *testing.T) {
expectedJob := &Job{
Name: "job",
Cron: "* * * * *",
Command: "command",
Params: []string{"param1 param1", "param2"},
FileName: "job",
Description: "comment"}
job, err := readJob("tests/job.conf")
assert.NoError(t, err)
assert.Equal(t, expectedJob, job)
}