From b5ce2b0c1810e7eb417ec7e581ae1166e5eb5bdf Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Fri, 7 Apr 2023 15:13:53 +0900 Subject: [PATCH] Update the test --- x/collection/keeper/grpc_query_test.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/x/collection/keeper/grpc_query_test.go b/x/collection/keeper/grpc_query_test.go index b7bf82913c..363abafa77 100644 --- a/x/collection/keeper/grpc_query_test.go +++ b/x/collection/keeper/grpc_query_test.go @@ -27,7 +27,23 @@ func (s *KeeperTestSuite) TestQueryBalance() { tokenID: tokenID, valid: true, postTest: func(res *collection.QueryBalanceResponse) { - expected := collection.NewCoin(tokenID, s.balance) + expected := collection.Coin{ + TokenId: tokenID, + Amount: s.balance, + } + s.Require().Equal(expected, res.Balance) + }, + }, + "valid request with zero amount": { + contractID: s.contractID, + address: s.vendor, + tokenID: "deadbeefdeadbeef", + valid: true, + postTest: func(res *collection.QueryBalanceResponse) { + expected := collection.Coin{ + TokenId: "deadbeefdeadbeef", + Amount: sdk.ZeroInt(), + } s.Require().Equal(expected, res.Balance) }, },