From 168db33985aa025eb48bc21087717ab70da0bd72 Mon Sep 17 00:00:00 2001 From: JP Sugarbroad Date: Thu, 15 Nov 2012 15:18:28 -0800 Subject: 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. --- test/ng/cacheFactorySpec.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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); + })); }); -- cgit v1.2.3