Compare commits

..

No commits in common. "7cdb42db7a1746a091ba50d3d9add204907d28cf" and "37a7fd55b7d6dd10faa1f07a15d44c6ef4f2662e" have entirely different histories.

View File

@ -96,8 +96,9 @@ var tests = [
var account = {
agreeTos: true
, keypair: goodGuy.keypair
, receipt: { foo: 'bar' }
, receipt: {}
};
return leStore.accounts.setAsync(goodGuy, account).then(function (account) {
if (!account || !account.id || !account.email) {
throw new Error('accounts.set should return the object with its new `id` attached');
@ -112,6 +113,7 @@ var tests = [
return leStore.accounts.checkAsync({
accountId: goodGuy.accountId
}).then(function (account) {
if (!account) {
throw new Error("Did not find account.");
}
@ -190,6 +192,7 @@ var tests = [
account[rnd] = rnd;
return leStore.accounts.setKeypairAsync(opts, account.keypair).then(function () {
return leStore.accounts.setAsync(opts, account).then(function (account) {
if ('_account_id' === account.id || '__account_id' === account.id) {
throw new Error("Should create `id` deterministically from email or public key, not the given `accountId` or `id`.");
}
@ -261,7 +264,7 @@ var tests = [
}
};
return leStore.certificates.setAsync(certOpts);
return leStore.certificates.setAsync(certOpts, certOpts.certs);
}
// and another
, function () {
@ -275,7 +278,7 @@ var tests = [
}
};
return leStore.certificates.setAsync(certOpts);
return leStore.certificates.setAsync(certOpts, certOpts.certs);
}
// basic test (set by email)