From 0e18c8adaa97628db1bd2c81a127f8b39358b521 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Mon, 4 Sep 2023 16:46:37 +0800 Subject: [PATCH] test: create new entry point TestKeeperMsgServer --- x/tokenfactory/keeper/msg_server_test.go | 6 ++++++ x/tokenfactory/types/authorityMetadata_test.go | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index f2b602ca..bd6ba3f8 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -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 diff --git a/x/tokenfactory/types/authorityMetadata_test.go b/x/tokenfactory/types/authorityMetadata_test.go index 093774ba..f651285f 100644 --- a/x/tokenfactory/types/authorityMetadata_test.go +++ b/x/tokenfactory/types/authorityMetadata_test.go @@ -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()) +}