Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanDonovan committed Jan 20, 2017
2 parents ed0a42e + 56aa6bc commit 04e6333
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/caching.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,25 @@ describe("caching", function() {
}, 20);
});
});

it("lets us delete data using promises", function(done) {
key = support.random.string();
cache.set(key, value)
.then(function() {
return cache.get(key);
}).then(function(val) {
assert.equal(val, value);
}).then(function() {
return cache.del(key);
}).then(function() {
return cache.get(key);
}).then(function(val) {
assert.strictEqual(val, undefined);
}).then(done)
.catch(function(err) {
done(err);
});
});
});
});
});
Expand Down

0 comments on commit 04e6333

Please sign in to comment.