More test on TxProposal, Identity and Insight

This commit is contained in:
Matias Pando 2015-02-10 11:24:31 -03:00
commit 40db2e2ba9
4 changed files with 66 additions and 8 deletions

View file

@ -291,6 +291,7 @@ describe('Insight model', function() {
});
});
describe('getActivity', function() {
it('should get activity for an innactive address', function(done) {
var blockchain = new Insight(FAKE_OPTS);
@ -309,6 +310,19 @@ describe('Insight model', function() {
});
});
it('should not get activity because of error', function(done) {
var blockchain = new Insight(FAKE_OPTS);
sinon.stub(blockchain, "getTransactions", function(addresses, from, to, cb) {
cb('error', []);
});
blockchain.getActivity(ADDRESSES, function(err, actives) {
chai.expect(err).to.be.not.null;
done();
});
});
it('should get activity for active addresses', function(done) {
var blockchain = new Insight(FAKE_OPTS);