Add test for TxProposal
This commit is contained in:
parent
503895fe6c
commit
63b4f2c649
2 changed files with 50 additions and 12 deletions
|
|
@ -74,6 +74,7 @@ describe('HDParams model', function() {
|
|||
|
||||
});
|
||||
|
||||
|
||||
it('should count generation indexes', function() {
|
||||
var j = new HDParams();
|
||||
j.copayerIndex = 1;
|
||||
|
|
@ -121,3 +122,28 @@ describe('HDParams model', function() {
|
|||
})
|
||||
|
||||
});
|
||||
|
||||
describe('#checkRange', function() {
|
||||
it('should throw an error', function() {
|
||||
var hd = new HDParams();
|
||||
|
||||
(function() {
|
||||
hd.checkRange(60, true);
|
||||
}).should.throw('Out of bounds');
|
||||
|
||||
});
|
||||
it('should throw an error', function() {
|
||||
var hd = new HDParams();
|
||||
|
||||
(function() {
|
||||
hd.checkRange(60, false);
|
||||
}).should.throw('Out of bounds');
|
||||
|
||||
});
|
||||
it('should not throw an error', function() {
|
||||
var hd = new HDParams();
|
||||
hd.checkRange(0, false);
|
||||
hd.checkRange(0, true);
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue