diff options
author | Valery Piashchynski <[email protected]> | 2020-11-09 15:11:10 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-09 15:11:10 +0300 |
commit | 0874bcb2f6b284a940ba4f3507eb8c4619c27868 (patch) | |
tree | c99d15624cd080cad22b7c8fb7d4714b2dc124fb /sync_worker_test.go | |
parent | 9fbe7726dd55cfedda724b7644e1b6bf7c1a6cb4 (diff) | |
parent | f218dcbd7e55d9ad1df8336e2331cdaa62d9ded3 (diff) |
Merge pull request #390 from spiral/feature/switch_to_spiral_errorsv2.0.0-alpha17
Feature/switch to spiral errors
Diffstat (limited to 'sync_worker_test.go')
-rwxr-xr-x | sync_worker_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sync_worker_test.go b/sync_worker_test.go index 1bc2deb1..add0a066 100755 --- a/sync_worker_test.go +++ b/sync_worker_test.go @@ -6,6 +6,7 @@ import ( "sync" "testing" + "github.com/spiral/errors" "github.com/stretchr/testify/assert" ) @@ -206,8 +207,10 @@ func Test_Error(t *testing.T) { assert.Nil(t, res.Body) assert.Nil(t, res.Context) - assert.IsType(t, ExecError{}, err) - assert.Equal(t, "hello", err.Error()) + if errors.Is(errors.Exec, err) == false { + t.Fatal("error should be of type errors.Exec") + } + assert.Contains(t, err.Error(), "exec payload: Exec: hello") } func Test_NumExecs(t *testing.T) { |