Type annotation for next_key() matching of json filter options (#11192)

* type annotation for next_key matching of json filter options

* rpc tests for pending transactions

* mention git submodules in the readme
This commit is contained in:
Fabio Lama
2019-10-23 14:20:47 +02:00
committed by Marek Kotewicz
parent 834585d61b
commit acf7c48d7e
3 changed files with 39 additions and 6 deletions

View File

@@ -316,7 +316,7 @@ fn rpc_parity_unsigned_transactions_count_when_signer_disabled() {
}
#[test]
fn rpc_parity_pending_transactions() {
fn rpc_parity_pending_transactions_without_limit_without_filter() {
let deps = Dependencies::new();
let io = deps.default_client();
@@ -326,6 +326,39 @@ fn rpc_parity_pending_transactions() {
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
}
#[test]
fn rpc_parity_pending_transactions_with_limit_without_filter() {
let deps = Dependencies::new();
let io = deps.default_client();
let request = r#"{"jsonrpc": "2.0", "method": "parity_pendingTransactions", "params":[5], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":[],"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
}
#[test]
fn rpc_parity_pending_transactions_without_limit_with_filter() {
let deps = Dependencies::new();
let io = deps.default_client();
let request = r#"{"jsonrpc": "2.0", "method": "parity_pendingTransactions", "params":[null,{"to":{"eq":"0xe8b2d01ffa0a15736b2370b6e5064f9702c891b6"},"gas":{"gt":"0x493e0"}}], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":[],"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
}
#[test]
fn rpc_parity_pending_transactions_with_limit_with_filter() {
let deps = Dependencies::new();
let io = deps.default_client();
let request = r#"{"jsonrpc": "2.0", "method": "parity_pendingTransactions", "params":[5,{"to":{"eq":"0xe8b2d01ffa0a15736b2370b6e5064f9702c891b6"},"gas":{"gt":"0x493e0"}}], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":[],"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
}
#[test]
fn rpc_parity_encrypt() {
let deps = Dependencies::new();