Skip to content

Commit

Permalink
test the job helper
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Mar 12, 2020
1 parent 21505bd commit 5c397ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions middleware_test.go
Expand Up @@ -22,6 +22,10 @@ func TestMiddleware(t *testing.T) {
counter := 0
blahFunc := func(ctx context.Context, job *faktory.Job) error {
assert.EqualValues(t, 4.0, ctx.Value("a"))
help := HelperFor(ctx)
assert.Equal(t, job.Jid, help.Jid())
assert.Equal(t, job.Type, help.JobType())
assert.Equal(t, "", help.Bid())
counter += 1
return nil
}
Expand Down

0 comments on commit 5c397ad

Please sign in to comment.