summaryrefslogtreecommitdiff
path: root/plugins/jobs/oooold/job_test.go
blob: 5db924ebd4a796710ff37893e1e23cf4e2c48df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package oooold

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func TestJob_Body(t *testing.T) {
	j := &Job{Payload: "hello"}

	assert.Equal(t, []byte("hello"), j.Body())
}

func TestJob_Context(t *testing.T) {
	j := &Job{Job: "job"}

	assert.Equal(t, []byte(`{"id":"id","job":"job"}`), j.Context("id"))
}