Skip to content

Commit

Permalink
Added del() test.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreavis committed Jul 31, 2014
1 parent fd2c473 commit d99fa89
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ var suite = function(cache) {
});
});

describe('del()', function() {
it('should remove object', function() {
var key = new_key();
var val = 1;
var size = cache.size();
cache.put(key, val, 100);
assert.equal(cache.get(key), val);
cache.del(key);
assert.isNull(cache.get(key));
assert.equal(cache.size(), size);
});
});

describe('hits()', function() {
it('should return number of cache hits', function() {
var key = new_key();
Expand Down

0 comments on commit d99fa89

Please sign in to comment.