Fixed build && test (#7128)

* fixed build && test

* fixed rpc tests
This commit is contained in:
Svyatoslav Nikolsky
2017-11-23 16:47:08 +03:00
committed by Tomasz Drwięga
parent 53e0e3be14
commit 5bd2894146
5 changed files with 7 additions and 5 deletions

View File

@@ -32,6 +32,7 @@ impl DappsService for TestDappsService {
version: "0.1".into(),
author: "Parity Technologies Ltd".into(),
icon_url: "title.png".into(),
local_url: None,
}]
}

View File

@@ -250,7 +250,7 @@ fn rpc_parity_set_dapps_list() {
io.extend_with(parity_set_client(&client, &miner, &updater, &network).to_delegate());
let request = r#"{"jsonrpc": "2.0", "method": "parity_dappsList", "params":[], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":[{"author":"Parity Technologies Ltd","description":"A skeleton dapp","iconUrl":"title.png","id":"skeleton","name":"Skeleton","version":"0.1"}],"id":1}"#;
let response = r#"{"jsonrpc":"2.0","result":[{"author":"Parity Technologies Ltd","description":"A skeleton dapp","iconUrl":"title.png","id":"skeleton","localUrl":null,"name":"Skeleton","version":"0.1"}],"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
}

View File

@@ -52,7 +52,7 @@ mod tests {
version: "0.1".into(),
author: "Parity Technologies Ltd".into(),
icon_url: "title.png".into(),
local_url: "http://localhost:5000".into(),
local_url: Some("http://localhost:5000".into()),
};
let serialized = serde_json::to_string(&dapp).unwrap();