mirror of
https://github.com/foomo/gotsrpc.git
synced 2026-08-12 12:50:19 +00:00
21 lines
353 B
Go
21 lines
353 B
Go
package gotsrpc //nolint:testpackage
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestErrorReply(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
inner := errors.New("boom")
|
|
reply := ErrorReply(inner)
|
|
|
|
wrapper, ok := reply.(*errorReply)
|
|
require.True(t, ok)
|
|
assert.Same(t, inner, wrapper.err)
|
|
}
|