Skip to content

Commit

Permalink
test: create new entry point TestKeeperMsgServer
Browse files Browse the repository at this point in the history
  • Loading branch information
emidev98 committed Sep 4, 2023
1 parent 79c594c commit 0e18c8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions x/tokenfactory/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ package keeper_test

import (
"fmt"
"testing"

"github.com/stretchr/testify/suite"
"github.com/terra-money/core/v2/x/tokenfactory/types"

sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
)

func TestKeeperMsgServer(t *testing.T) {
suite.Run(t, new(KeeperTestSuite))
}

// TestMintDenomMsg tests TypeMsgMint message is emitted on a successful mint
func (s *KeeperTestSuite) TestMintDenomMsg() {
// Create a denom
Expand Down
10 changes: 9 additions & 1 deletion x/tokenfactory/types/authorityMetadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ import (
"github.com/terra-money/core/v2/x/tokenfactory/types"
)

func TestAuthorityMetadata(t *testing.T) {
func TestAuthorityMetadataError(t *testing.T) {
data := types.DenomAuthorityMetadata{
Admin: "satoshi",
}

require.Error(t, data.Validate())
}

func TestAuthorityMetadata(t *testing.T) {
data := types.DenomAuthorityMetadata{
Admin: "terra1zdpgj8am5nqqvht927k3etljyl6a52kwqup0je",
}

require.Error(t, data.Validate())
}

0 comments on commit 0e18c8a

Please sign in to comment.