aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/ngViewSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2012-05-22 21:12:19 -0700
committerMisko Hevery2012-06-01 16:56:31 -0700
commit885fb0dd0743859a8985c23e4d0c1855a2be711e (patch)
tree96b03b26395d500c21e4044f7afb048c2a7cebe9 /test/ng/directive/ngViewSpec.js
parent4361efb03b79e71bf0cea92b94ff377ed718bad4 (diff)
downloadangular.js-885fb0dd0743859a8985c23e4d0c1855a2be711e.tar.bz2
feat($route): resolve local route promises
Resolve all promises on route before we fire $afterRouteChange which then renders the ngView.
Diffstat (limited to 'test/ng/directive/ngViewSpec.js')
-rw-r--r--test/ng/directive/ngViewSpec.js22
1 files changed, 2 insertions, 20 deletions
diff --git a/test/ng/directive/ngViewSpec.js b/test/ng/directive/ngViewSpec.js
index 00fc6827..7524884f 100644
--- a/test/ng/directive/ngViewSpec.js
+++ b/test/ng/directive/ngViewSpec.js
@@ -229,24 +229,6 @@ describe('ngView', function() {
});
- it('should clear the content when error during xhr request', function() {
- module(function($routeProvider) {
- $routeProvider.when('/foo', {controller: noop, template: 'myUrl1'});
- });
-
- inject(function($route, $location, $rootScope, $httpBackend) {
- $location.path('/foo');
- $httpBackend.expect('GET', 'myUrl1').respond(404, '');
- element.text('content');
-
- $rootScope.$digest();
- $httpBackend.flush();
-
- expect(element.text()).toBe('');
- });
- });
-
-
it('should be async even if served from cache', function() {
module(function($routeProvider) {
$routeProvider.when('/foo', {controller: noop, template: 'myUrl1'});
@@ -293,8 +275,8 @@ describe('ngView', function() {
$rootScope.$digest();
expect(element.text()).toBe('bound-value');
- expect(log).toEqual(['$beforeRouteChange', '$afterRouteChange', 'init-ctrl',
- '$viewContentLoaded']);
+ expect(log).toEqual([
+ '$beforeRouteChange', 'init-ctrl', '$viewContentLoaded', '$afterRouteChange' ]);
});
});