Merge branch 'tests'
This commit is contained in:
commit
a52e2aeb8e
|
@ -94,8 +94,9 @@ var tests = [
|
||||||
// create a new account
|
// create a new account
|
||||||
, function () {
|
, function () {
|
||||||
var account = {
|
var account = {
|
||||||
receipt: {}
|
agreeTos: true
|
||||||
, agreeTos: true
|
, keypair: goodGuy.keypair
|
||||||
|
, receipt: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
return leStore.accounts.setAsync(goodGuy, account).then(function (account) {
|
return leStore.accounts.setAsync(goodGuy, account).then(function (account) {
|
||||||
|
@ -145,6 +146,14 @@ var tests = [
|
||||||
email: goodGuy.email
|
email: goodGuy.email
|
||||||
}).then(function (account) {
|
}).then(function (account) {
|
||||||
|
|
||||||
|
if (!account) {
|
||||||
|
throw new Error("should have returned account for " + goodGuy.email);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!account.keypair) {
|
||||||
|
throw new Error("should have returned account.keypair for " + goodGuy.email);
|
||||||
|
}
|
||||||
|
|
||||||
if (goodGuy.keypair.privateKeyPem !== account.keypair.privateKeyPem) {
|
if (goodGuy.keypair.privateKeyPem !== account.keypair.privateKeyPem) {
|
||||||
if (account.keypair.privateKeyJwk) {
|
if (account.keypair.privateKeyJwk) {
|
||||||
throw new Error("Error in test itself (not your fault). TODO: implement checking privateKeyJwk.");
|
throw new Error("Error in test itself (not your fault). TODO: implement checking privateKeyJwk.");
|
||||||
|
|
Loading…
Reference in New Issue