Fix tests and increase coverage of them

This commit is contained in:
Gustavo Cortez 2014-07-02 10:44:20 -03:00
commit 392fb8586b
2 changed files with 7 additions and 6 deletions

View file

@ -735,15 +735,13 @@ describe('Wallet model', function() {
});
});
it('#updateIndexes should store and emit event', function(done) {
it('#updateIndexes should store wallet', function(done) {
mockFakeActivity(function(index) {
return index <= 14 && index % 2 == 0;
});
var spyStore = sinon.spy(w, 'store');
var spyEmit = sinon.spy(w, 'emit');
w.updateIndexes(function(err) {
sinon.assert.callCount(spyStore, 1);
sinon.assert.callCount(spyEmit, 2);
done();
});
});