From 626b6b6af3e452e15ac0e0fe2e1ac7c3ea3e7d86 Mon Sep 17 00:00:00 2001 From: Dave Kerr Date: Sat, 28 Jun 2014 20:38:27 +0200 Subject: [PATCH] Tidied up readme, fixed a bug in the cache test --- README.md | 2 +- test/template.spec.js | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index caf4606..856ff8b 100644 --- a/README.md +++ b/README.md @@ -171,4 +171,4 @@ Thanks Thanks go the the following contributors: -[https://github.com/joshvillbrandt](joshvillbrant) - Adding support for `$templateCache`. \ No newline at end of file +[joshvillbrandt](https://github.com/joshvillbrandt) - Adding support for `$templateCache`. \ No newline at end of file diff --git a/test/template.spec.js b/test/template.spec.js index 4ec8c38..09793b9 100644 --- a/test/template.spec.js +++ b/test/template.spec.js @@ -63,21 +63,21 @@ describe('template', function() { controller: "TemplateController", templateUrl: "templatetobecached.html" }).then(function(modal) { - expect(modal).not.toBe(null); - }); - // The template should now be cached... - spyOn($templateCache, 'get'); + // The template should now be cached... + spyOn($templateCache, 'get').and.callThrough(); - ModalService.showModal({ - controller: "TemplateController", - templateUrl: "templatetobecached.html" - }).then(function(modal) { - expect(modal).not.toBe(null); - }); + ModalService.showModal({ + controller: "TemplateController", + templateUrl: "templatetobecached.html" + }).then(function(modal) { + expect(modal).not.toBe(null); + }); - // ...so get should have been called. - expect($templateCache.get).toHaveBeenCalledWith('templatetobecached.html'); + // ...so get should have been called. + expect($templateCache.get).toHaveBeenCalledWith('templatetobecached.html'); + + }); $httpBackend.flush();