diff options
Diffstat (limited to 'plugins/jobs/broker/beanstalk/tube_test.go')
-rw-r--r-- | plugins/jobs/broker/beanstalk/tube_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/jobs/broker/beanstalk/tube_test.go b/plugins/jobs/broker/beanstalk/tube_test.go new file mode 100644 index 00000000..b6a646f4 --- /dev/null +++ b/plugins/jobs/broker/beanstalk/tube_test.go @@ -0,0 +1,18 @@ +package beanstalk + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestTube_CantServe(t *testing.T) { + var gctx interface{} + tube := &tube{ + lsn: func(event int, ctx interface{}) { + gctx = ctx + }, + } + + tube.serve(&Config{Addr: "broken"}) + assert.Error(t, gctx.(error)) +} |