mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-14 05:58:19 +00:00
18 lines
394 B
Go
18 lines
394 B
Go
|
package blockchain
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/pkg/errors"
|
||
|
"github.com/prysmaticlabs/prysm/testing/require"
|
||
|
)
|
||
|
|
||
|
func TestIsInvalidBlock(t *testing.T) {
|
||
|
require.Equal(t, false, IsInvalidBlock(ErrInvalidPayload))
|
||
|
err := invalidBlock{ErrInvalidPayload}
|
||
|
require.Equal(t, true, IsInvalidBlock(err))
|
||
|
|
||
|
newErr := errors.Wrap(err, "wrap me")
|
||
|
require.Equal(t, true, IsInvalidBlock(newErr))
|
||
|
}
|