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

@ -306,7 +306,7 @@ mod tests {
version: "".into(),
author: "".into(),
icon_url: "".into(),
local_url: "".into(),
local_url: Some("".into()),
}, Default::default(), None);
// when

View File

@ -180,14 +180,15 @@ fn should_return_fetched_dapp_content() {
assert_security_headers_for_embed(&response2.headers);
assert_eq!(
response2.body,
r#"BE
r#"D2
{
"id": "9c94e154dab8acf859b30ee80fc828fb1d38359d938751b65db71d460588d82a",
"name": "Gavcoin",
"description": "Gavcoin",
"version": "1.0.0",
"author": "",
"iconUrl": "icon.png"
"iconUrl": "icon.png",
"localUrl": null
}
0

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();