Skip to content

Commit

Permalink
chore: Added test which was rolled back
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Nikolashyn committed Jul 25, 2024
1 parent 057a002 commit 203bc50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/isc/chainid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/iotaledger/wasp/packages/util/rwutil"
"github.com/stretchr/testify/require"
)

func TestChainIDSerialization(t *testing.T) {
Expand All @@ -12,3 +13,10 @@ func TestChainIDSerialization(t *testing.T) {
rwutil.BytesTest(t, chainID, ChainIDFromBytes)
rwutil.StringTest(t, chainID, ChainIDFromString)
}

func TestIncorrectPrefix(t *testing.T) {
chainID := "rms1prxunz807j39nmhzy3gre4hwdlzvdjyrkfn59d27x6xh426y8ajt205mh9g"
_, err := ChainIDFromString(chainID)

require.ErrorContains(t, err, "invalid network prefix: rms")
}

0 comments on commit 203bc50

Please sign in to comment.