Skip to content

Commit

Permalink
Update the test
Browse files Browse the repository at this point in the history
  • Loading branch information
0Tech committed Apr 7, 2023
1 parent 1a8350e commit b5ce2b0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion x/collection/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
},
Expand Down

0 comments on commit b5ce2b0

Please sign in to comment.