mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 03:30:02 +08:00
feat($cacheFactory): cache.put now returns the added value
This allows common programming patterns to be expressed with more concise code. See #1583 for code examples.
This commit is contained in:
committed by
Igor Minar
parent
79af2badcb
commit
168db33985
@@ -104,6 +104,12 @@ describe('$cacheFactory', function() {
|
||||
cache.remove(123);
|
||||
expect(cache.info().size).toBe(0);
|
||||
}));
|
||||
|
||||
|
||||
it("should return value from put", inject(function($cacheFactory) {
|
||||
var obj = {};
|
||||
expect(cache.put('k1', obj)).toBe(obj);
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user