diff options
author | Valery Piashchynski <[email protected]> | 2021-06-22 17:33:55 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-22 17:33:55 +0300 |
commit | 035e432af9a059e9e5187bd03f2e7864ed94c054 (patch) | |
tree | 16383fdb9ee7c635e14cd1898ec573f331ba8d30 /plugins/jobs/structs/job_test.go | |
parent | 5627146e45afbb8f6566862c60a42a0b0aad2d0a (diff) |
- Folders struct
- Initial ephemeral broker commit
- Initial RPC
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/structs/job_test.go')
-rw-r--r-- | plugins/jobs/structs/job_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/jobs/structs/job_test.go b/plugins/jobs/structs/job_test.go new file mode 100644 index 00000000..e7240c6b --- /dev/null +++ b/plugins/jobs/structs/job_test.go @@ -0,0 +1,19 @@ +package structs + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +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")) +} |