Refactored copayers selection on create form

This commit is contained in:
Ivan Socolsky 2014-09-30 13:04:48 -03:00
commit 33e115d0c2
3 changed files with 52 additions and 43 deletions

View file

@ -393,6 +393,27 @@ describe('Wallet model', function() {
w.maxRejectCount().should.equal(2);
});
describe('#getMaxRequiredCopayers', function() {
it('should return ', function() {
var validPairs = {
1: 1,
2: 2,
3: 3,
4: 4,
5: 4,
6: 3,
7: 3,
8: 2,
9: 2,
10: 2,
11: 1,
12: 1,
};
_.each(validPairs, function(maxReq, total) {
Wallet.getMaxRequiredCopayers(total).should.equal(maxReq);
})
});
});
describe('#_onData', function() {
var w = cachedCreateW();