add a few more checks to the rpc tests
This commit is contained in:
parent
170aa6d47e
commit
8fbb32c5d7
@ -401,11 +401,17 @@ nThen(function (w) {
|
|||||||
value: [
|
value: [
|
||||||
alice.edKeys.edPublic
|
alice.edKeys.edPublic
|
||||||
]
|
]
|
||||||
}, w(function (err /*, metadata */) {
|
}, w(function (err, response) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
throw new Error("FAIL");
|
||||||
return void console.error(err);
|
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) {
|
}).nThen(function (w) {
|
||||||
oscar.anonRpc.send('GET_METADATA', oscar.mailboxChannel, w(function (err, response) {
|
oscar.anonRpc.send('GET_METADATA', oscar.mailboxChannel, w(function (err, response) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user