summaryrefslogtreecommitdiff
path: root/errors_test.go
blob: 69f1c9eccc4f7f32a701fa5befe687e0ed8f3d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package roadrunner

import (
	"errors"
	"testing"

	"github.com/stretchr/testify/assert"
)

func Test_JobError_Error(t *testing.T) {
	e := TaskError([]byte("error"))
	assert.Equal(t, "error", e.Error())
}

func Test_WorkerError_Error(t *testing.T) {
	e := WorkerError{Worker: nil, Caused: errors.New("error")}
	assert.Equal(t, "error", e.Error())
}