add a few more checks to the rpc tests

pull/1/head
ansuz 5 years ago
parent 170aa6d47e
commit 8fbb32c5d7

@ -401,11 +401,17 @@ nThen(function (w) {
value: [
alice.edKeys.edPublic
]
}, w(function (err /*, metadata */) {
}, w(function (err, response) {
if (err) {
throw new Error("FAIL");
return void console.error(err);
}
//console.log('XXX', metadata);
var metadata = response && response[0];
if (!metadata || !Array.isArray(metadata.allowed) ||
metadata.allowed.indexOf(alice.edKeys.edPublic) === -1) {
throw new Error("EXPECTED ALICE TO BE IN THE ALLOW LIST");
}
}));
}).nThen(function (w) {
oscar.anonRpc.send('GET_METADATA', oscar.mailboxChannel, w(function (err, response) {

Loading…
Cancel
Save