mirror of https://github.com/BTCPrivate/copay.git
fix merge with master
This commit is contained in:
parent
f4a5202a99
commit
3ce3af4408
|
@ -627,7 +627,9 @@ describe('Wallet model', function() {
|
|||
|
||||
it('#indexDiscovery should work without found activities', function(done) {
|
||||
var w = createW2();
|
||||
mockFakeActivity(w, function(index) { return false });
|
||||
mockFakeActivity(w, function(index) {
|
||||
return false
|
||||
});
|
||||
w.indexDiscovery(0, false, 5, function(e, lastActive) {
|
||||
lastActive.should.equal(-1);
|
||||
done();
|
||||
|
@ -636,7 +638,9 @@ describe('Wallet model', function() {
|
|||
|
||||
it('#indexDiscovery should continue scanning', function(done) {
|
||||
var w = createW2();
|
||||
mockFakeActivity(w, function(index) { return index <= 7 });
|
||||
mockFakeActivity(w, function(index) {
|
||||
return index <= 7
|
||||
});
|
||||
w.indexDiscovery(0, false, 5, function(e, lastActive) {
|
||||
lastActive.should.equal(7);
|
||||
done();
|
||||
|
@ -645,7 +649,9 @@ describe('Wallet model', function() {
|
|||
|
||||
it('#indexDiscovery should not found beyond the scannWindow', function(done) {
|
||||
var w = createW2();
|
||||
mockFakeActivity(w, function(index) { return index <= 10 || index == 17 });
|
||||
mockFakeActivity(w, function(index) {
|
||||
return index <= 10 || index == 17
|
||||
});
|
||||
w.indexDiscovery(0, false, 5, function(e, lastActive) {
|
||||
lastActive.should.equal(10);
|
||||
done();
|
||||
|
@ -654,7 +660,9 @@ describe('Wallet model', function() {
|
|||
|
||||
it('#indexDiscovery should look for activity along the scannWindow', function(done) {
|
||||
var w = createW2();
|
||||
mockFakeActivity(w, function(index) { return index <= 14 && index % 2 == 0 });
|
||||
mockFakeActivity(w, function(index) {
|
||||
return index <= 14 && index % 2 == 0
|
||||
});
|
||||
w.indexDiscovery(0, false, 5, function(e, lastActive) {
|
||||
lastActive.should.equal(14);
|
||||
done();
|
||||
|
@ -663,7 +671,9 @@ describe('Wallet model', function() {
|
|||
|
||||
it('#updateIndexes should update correctly', function(done) {
|
||||
var w = createW2();
|
||||
mockFakeActivity(w, function(index) { return index <= 14 && index % 2 == 0 });
|
||||
mockFakeActivity(w, function(index) {
|
||||
return index <= 14 && index % 2 == 0
|
||||
});
|
||||
w.updateIndexes(function(err) {
|
||||
w.publicKeyRing.indexes.receiveIndex.should.equal(15);
|
||||
w.publicKeyRing.indexes.changeIndex.should.equal(15);
|
||||
|
@ -673,7 +683,9 @@ describe('Wallet model', function() {
|
|||
|
||||
it('#updateIndexes should store and emit event', function(done) {
|
||||
var w = createW2();
|
||||
mockFakeActivity(w, function(index) { return index <= 14 && index % 2 == 0 });
|
||||
mockFakeActivity(w, function(index) {
|
||||
return index <= 14 && index % 2 == 0
|
||||
});
|
||||
var spyStore = sinon.spy(w, 'store');
|
||||
var spyEmit = sinon.spy(w, 'emit');
|
||||
w.updateIndexes(function(err) {
|
||||
|
@ -695,16 +707,13 @@ describe('Wallet model', function() {
|
|||
done();
|
||||
});
|
||||
|
||||
var contacts = [
|
||||
{
|
||||
var contacts = [{
|
||||
label: 'Charles',
|
||||
address: '2N8pJWpXCAxmNLHKVEhz3TtTcYCtHd43xWU ',
|
||||
},
|
||||
{
|
||||
}, {
|
||||
label: 'Linda',
|
||||
address: '2N4Zq92goYGrf5J4F4SZZq7jnPYbCiyRYT2 ',
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
it('should create new entry for address book', function() {
|
||||
var w = createW();
|
||||
|
@ -753,12 +762,6 @@ describe('Wallet model', function() {
|
|||
data.addressBook['msj42CCGruhRsFrGATiUuh25dtxYtnpbTx'].createdTs = 1403102215;
|
||||
w._handleAddressBook('senderID', data, true);
|
||||
Object.keys(w.addressBook).length.should.equal(3);
|
||||
w.sendTxProposal.should.throw('Illegal Argument.');
|
||||
(function() {
|
||||
w.sendTxProposal(ntxid)
|
||||
}).should.not.throw();
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('#getNetworkName', function() {
|
||||
|
|
Loading…
Reference in New Issue