fix more tests

This commit is contained in:
Manuel Araoz 2014-08-19 17:31:40 -04:00
parent f10a58ed72
commit 043fb16d64
2 changed files with 4 additions and 12 deletions

View File

@ -350,7 +350,7 @@ Network.prototype.send = function(dest, payload, cb) {
var self = this;
if (!dest) {
defst = this.getCopayerIds();
dest = this.getCopayerIds();
payload.isBroadcast = 1;
}

View File

@ -60,10 +60,7 @@ describe('Network / Async', function() {
describe('#send', function() {
it('should call _sendToOne for a copayer', function(done) {
var n = createN();
n.privkey = bitcore.util.sha256('test');
n.key = null;
var n = createN('9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08');
var data = new bitcore.Buffer('my data to send');
var copayerId = '03b51d01d798522cf61211b4dfcdd6d01020304cf166e1cb7f43d836abc5c18b23';
@ -76,10 +73,7 @@ describe('Network / Async', function() {
});
it('should call _sendToOne with encrypted data for a copayer', function(done) {
var n = createN();
n.privkey = bitcore.util.sha256('test');
n.key = null;
var n = createN('9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08');
var data = new bitcore.Buffer('my data to send');
var copayerId = '03b51d01d798522cf61001b4dfcdd6db219ee33cf166e1cb7f43d836abc5c18b23';
@ -96,9 +90,7 @@ describe('Network / Async', function() {
});
it('should call _sendToOne for a list of copayers', function(done) {
var n = createN();
n.privkey = bitcore.util.sha256('test');
var n = createN('9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08');
var data = new bitcore.Buffer('my data to send');
var copayerIds = ['03b51d01d798522cf61211b4dfcdd6db219ee33cf166e1cb7f43d836abc5c18b23'];
n._sendToOne = function(a1, a2, cb) {