2014-02-19 11:07:50 -08:00
|
|
|
'use strict';
|
|
|
|
|
2014-03-08 13:42:08 -08:00
|
|
|
var chai = chai || require('chai');
|
|
|
|
var bitcore = bitcore || require('../bitcore');
|
2014-02-19 11:07:50 -08:00
|
|
|
var should = chai.should();
|
|
|
|
|
2014-07-18 09:24:57 -07:00
|
|
|
var SINKey = bitcore.SINKey;
|
2014-02-19 11:07:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
describe('SINKey', function() {
|
|
|
|
it('should initialze the main object', function() {
|
|
|
|
should.exist(SINKey);
|
|
|
|
});
|
|
|
|
it('should be able to create instance', function() {
|
|
|
|
var sk = new SINKey();
|
|
|
|
sk.generate();
|
|
|
|
should.exist(sk.created);
|
|
|
|
should.exist(sk.privKey.private);
|
|
|
|
should.exist(sk.privKey.public);
|
|
|
|
should.exist(sk.privKey.compressed);
|
|
|
|
});
|
2014-07-18 09:24:57 -07:00
|
|
|
|
|
|
|
describe('#storeObj', function() {
|
|
|
|
it('should give an object', function() {
|
|
|
|
var sinkey = new SINKey();
|
|
|
|
sinkey.generate();
|
|
|
|
var obj = sinkey.storeObj();
|
|
|
|
should.exist(obj);
|
|
|
|
});
|
|
|
|
});
|
2014-02-19 11:07:50 -08:00
|
|
|
});
|