parent
53e0e3be14
commit
5bd2894146
@ -306,7 +306,7 @@ mod tests {
|
|||||||
version: "".into(),
|
version: "".into(),
|
||||||
author: "".into(),
|
author: "".into(),
|
||||||
icon_url: "".into(),
|
icon_url: "".into(),
|
||||||
local_url: "".into(),
|
local_url: Some("".into()),
|
||||||
}, Default::default(), None);
|
}, Default::default(), None);
|
||||||
|
|
||||||
// when
|
// when
|
||||||
|
@ -180,14 +180,15 @@ fn should_return_fetched_dapp_content() {
|
|||||||
assert_security_headers_for_embed(&response2.headers);
|
assert_security_headers_for_embed(&response2.headers);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
response2.body,
|
response2.body,
|
||||||
r#"BE
|
r#"D2
|
||||||
{
|
{
|
||||||
"id": "9c94e154dab8acf859b30ee80fc828fb1d38359d938751b65db71d460588d82a",
|
"id": "9c94e154dab8acf859b30ee80fc828fb1d38359d938751b65db71d460588d82a",
|
||||||
"name": "Gavcoin",
|
"name": "Gavcoin",
|
||||||
"description": "Gavcoin",
|
"description": "Gavcoin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"author": "",
|
"author": "",
|
||||||
"iconUrl": "icon.png"
|
"iconUrl": "icon.png",
|
||||||
|
"localUrl": null
|
||||||
}
|
}
|
||||||
0
|
0
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ impl DappsService for TestDappsService {
|
|||||||
version: "0.1".into(),
|
version: "0.1".into(),
|
||||||
author: "Parity Technologies Ltd".into(),
|
author: "Parity Technologies Ltd".into(),
|
||||||
icon_url: "title.png".into(),
|
icon_url: "title.png".into(),
|
||||||
|
local_url: None,
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ fn rpc_parity_set_dapps_list() {
|
|||||||
io.extend_with(parity_set_client(&client, &miner, &updater, &network).to_delegate());
|
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 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()));
|
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ mod tests {
|
|||||||
version: "0.1".into(),
|
version: "0.1".into(),
|
||||||
author: "Parity Technologies Ltd".into(),
|
author: "Parity Technologies Ltd".into(),
|
||||||
icon_url: "title.png".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();
|
let serialized = serde_json::to_string(&dapp).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user