diff options
| author | JP Sugarbroad | 2012-11-15 15:18:28 -0800 | 
|---|---|---|
| committer | Igor Minar | 2012-11-25 00:01:34 +0100 | 
| commit | 168db33985aa025eb48bc21087717ab70da0bd72 (patch) | |
| tree | 149033cbf209d43924138fdf462fe47a422a5694 /test/ng/cacheFactorySpec.js | |
| parent | 79af2badcb087881e3fd600f6ae5bf3f86a2daf8 (diff) | |
| download | angular.js-168db33985aa025eb48bc21087717ab70da0bd72.tar.bz2 | |
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.
Diffstat (limited to 'test/ng/cacheFactorySpec.js')
| -rw-r--r-- | test/ng/cacheFactorySpec.js | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/test/ng/cacheFactorySpec.js b/test/ng/cacheFactorySpec.js index 88e8e523..ddfadbbc 100644 --- a/test/ng/cacheFactorySpec.js +++ b/test/ng/cacheFactorySpec.js @@ -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); +      }));      }); | 
