refactor readWallet
This commit is contained in:
parent
2bc1945309
commit
a446d3775e
1 changed files with 3 additions and 3 deletions
|
|
@ -343,8 +343,8 @@ describe('Storage model', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#readWallet', function() {
|
describe('#getFirst', function() {
|
||||||
it('should read wallet', function(done) {
|
it('should read first key', function(done) {
|
||||||
var data = {
|
var data = {
|
||||||
'wallet::id1_wallet1': {
|
'wallet::id1_wallet1': {
|
||||||
a: 'x',
|
a: 'x',
|
||||||
|
|
@ -358,7 +358,7 @@ describe('Storage model', function() {
|
||||||
sinon.stub(s, '_read', function(k, cb) {
|
sinon.stub(s, '_read', function(k, cb) {
|
||||||
return cb(data[k]);
|
return cb(data[k]);
|
||||||
});
|
});
|
||||||
s.readWallet('id1', function(err, w) {
|
s.getFirst('wallet::id1', function(err, w) {
|
||||||
should.not.exist(err);
|
should.not.exist(err);
|
||||||
w.should.exist;
|
w.should.exist;
|
||||||
w.hasOwnProperty('a').should.be.true;
|
w.hasOwnProperty('a').should.be.true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue