@@ -64,12 +64,16 @@ func TestQueryAllContractState(t *testing.T) {
6464 Offset : 1 ,
6565 },
6666 },
67- expModelContains : []types.Model {
68- {Key : []byte ("foo" ), Value : []byte (`"bar"` )},
69- },
70- expModelContainsNot : []types.Model {
71- {Key : []byte {0x0 , 0x1 }, Value : []byte (`{"count":8}` )},
67+ expErr : status .Error (codes .InvalidArgument , "offset and count queries not supported anymore" ),
68+ },
69+ "with pagination count" : {
70+ srcQuery : & types.QueryAllContractStateRequest {
71+ Address : contractAddr .String (),
72+ Pagination : & query.PageRequest {
73+ CountTotal : true ,
74+ },
7275 },
76+ expErr : status .Error (codes .InvalidArgument , "offset and count queries not supported anymore" ),
7377 },
7478 "with pagination limit" : {
7579 srcQuery : & types.QueryAllContractStateRequest {
@@ -108,6 +112,7 @@ func TestQueryAllContractState(t *testing.T) {
108112 require .Equal (t , spec .expErr .Error (), err .Error ())
109113 return
110114 }
115+ require .NoError (t , err )
111116 for _ , exp := range spec .expModelContains {
112117 assert .Contains (t , got .Models , exp )
113118 }
0 commit comments