mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Add validations subscriptions (RIPD-504)
This commit is contained in:
@@ -169,4 +169,20 @@ suite('JSON-RPC', function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('subscribe validations', function(done) {
|
||||
var rippled_config = testutils.get_server_config(config);
|
||||
var client = jsonrpc.client("http://" + rippled_config.rpc_ip + ":" + rippled_config.rpc_port);
|
||||
var http_config = config.http_servers["zed"];
|
||||
|
||||
client.call('subscribe', [{
|
||||
'url' : "http://" + http_config.ip + ":" + http_config.port,
|
||||
'streams' : [ 'validations' ],
|
||||
}], function (result) {
|
||||
// console.log(JSON.stringify(result, undefined, 2));
|
||||
assert(typeof result === 'object');
|
||||
assert(result.status === 'success');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user