Add some test and refactor getCosigner
This commit is contained in:
parent
680b0b553e
commit
7562c3f9e7
4 changed files with 54 additions and 18 deletions
|
|
@ -47,6 +47,18 @@ describe('AddressIndex model', function() {
|
|||
cosigners.indexOf(2).should.equal(-1);
|
||||
});
|
||||
|
||||
it('should serialize to object list and back', function() {
|
||||
var is = AddressIndex.init(3);
|
||||
should.exist(is);
|
||||
is.length.should.equal(4);
|
||||
|
||||
var list = AddressIndex.serialize(is);
|
||||
list.length.should.equal(4);
|
||||
|
||||
var is2 = AddressIndex.fromList(list);
|
||||
is2.length.should.equal(4);
|
||||
});
|
||||
|
||||
it('show be able to store and read', function() {
|
||||
var i = createAI();
|
||||
var changeN = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue