commit
57b98d24d4
7 changed files with 42 additions and 10 deletions
|
|
@ -171,6 +171,7 @@ describe('Identity model', function() {
|
|||
var storage = sinon.stub();
|
||||
storage.setCredentials = sinon.stub();
|
||||
storage.removeItem = sinon.stub().yields(null);
|
||||
storage.clear = sinon.stub().yields();
|
||||
|
||||
var opts = {
|
||||
email: 'test@test.com',
|
||||
|
|
@ -191,6 +192,7 @@ describe('Identity model', function() {
|
|||
should.not.exist(err);
|
||||
storage.removeItem.calledOnce.should.be.true;
|
||||
storage.removeItem.getCall(0).args[0].should.equal(iden.getId());
|
||||
storage.clear.calledOnce.should.be.true;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
@ -199,6 +201,7 @@ describe('Identity model', function() {
|
|||
var storage = sinon.stub();
|
||||
storage.setCredentials = sinon.stub();
|
||||
storage.removeItem = sinon.stub().yields(null);
|
||||
storage.clear = sinon.stub().yields();
|
||||
|
||||
var opts = {
|
||||
email: 'test@test.com',
|
||||
|
|
@ -231,6 +234,7 @@ describe('Identity model', function() {
|
|||
storage.removeItem.callCount.should.equal(4);
|
||||
storage.removeItem.getCall(0).args[0].should.equal(Wallet.getStorageKey('wallet0'));
|
||||
storage.removeItem.getCall(3).args[0].should.equal(iden.getId());
|
||||
storage.clear.calledOnce.should.be.true;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ describe('local storage plugin', function() {
|
|||
it('#clear', function(done) {
|
||||
storage.clear(function(err) {
|
||||
assert(!err);
|
||||
storageMock.clear.calledOnce.should.equal(true);
|
||||
storageMock.clear.calledOnce.should.be.false;
|
||||
return done();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue