Added a test to PublicKeyRing to increase coverage
This commit is contained in:
parent
f8c665ce2e
commit
d4ce4e3c01
2 changed files with 18 additions and 3 deletions
|
|
@ -434,6 +434,21 @@ describe('PublicKeyRing model', function() {
|
|||
w.nicknameForIndex(4).should.equal('juan1');
|
||||
});
|
||||
|
||||
it('#fromObj with error', function() {
|
||||
|
||||
var config = {
|
||||
networkName: 'livenet',
|
||||
};
|
||||
var pkr = new PublicKeyRing(config);
|
||||
|
||||
|
||||
(function ()
|
||||
{
|
||||
PublicKeyRing.fromObj(pkr);
|
||||
}
|
||||
).should.throw('bad data format: Did you use .toObj()?');
|
||||
});
|
||||
|
||||
|
||||
it('#toObj #fromObj with nickname', function() {
|
||||
var config = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue