Skip to content

Commit

Permalink
tests: adding key tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seantking committed Sep 17, 2021
1 parent 9e39ea1 commit 9e98647
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modules/apps/27-interchain-accounts/types/keys_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package types_test

import (
"fmt"
"testing"

"github.com/stretchr/testify/require"

"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
)

func TestKeyActiveChannel(t *testing.T) {
key := types.KeyActiveChannel("owner")
require.Equal(t, string(key), "activeChannel/owner")
}

func TestGetIdentifier(t *testing.T) {
identifier := types.GetIdentifier(types.PortID, "channel-0")
require.Equal(t, identifier, fmt.Sprintf("%s/channel-0/", types.PortID))
}

0 comments on commit 9e98647

Please sign in to comment.