Skip to content

Commit

Permalink
Tidied up readme, fixed a bug in the cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
dwmkerr committed Jun 28, 2014
1 parent 8296462 commit 626b6b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ Thanks

Thanks go the the following contributors:

[https://github.com/joshvillbrandt](joshvillbrant) - Adding support for `$templateCache`.
[joshvillbrandt](https://github.com/joshvillbrandt) - Adding support for `$templateCache`.
24 changes: 12 additions & 12 deletions test/template.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 626b6b6

Please sign in to comment.