Skip to content

Commit d37d595

Browse files
committed
test($location): fix tests borked during event renaming
1 parent 5d70e4a commit d37d595

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/ng/locationSpec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ describe('$location', function() {
10071007
$log.info('before', newUrl, oldUrl, $browser.url());
10081008
event.preventDefault();
10091009
});
1010-
$rootScope.$on('$locationChangeCompleted', function(event, newUrl, oldUrl) {
1010+
$rootScope.$on('$locationChangeSuccess', function(event, newUrl, oldUrl) {
10111011
throw Error('location should have been canceled');
10121012
});
10131013

@@ -1026,7 +1026,7 @@ describe('$location', function() {
10261026
expect($browser.url()).toEqual('http://server/');
10271027
}));
10281028

1029-
it ('should fire $locationChangeCompleted event when change from browser location bar',
1029+
it ('should fire $locationChangeSuccess event when change from browser location bar',
10301030
inject(function($log, $location, $browser, $rootScope) {
10311031
$rootScope.$apply(); // clear initial $locationChangeStart
10321032

@@ -1068,7 +1068,7 @@ describe('$location', function() {
10681068
event.preventDefault();
10691069
log += '$locationChangeStart';
10701070
});
1071-
$rootScope.$on('$locationChangeCompleted', function() {
1071+
$rootScope.$on('$locationChangeSuccess', function() {
10721072
throw new Error('after cancellation in hashbang mode');
10731073
});
10741074

@@ -1100,7 +1100,7 @@ describe('$location', function() {
11001100
event.preventDefault();
11011101
log += '$locationChangeStart';
11021102
});
1103-
$rootScope.$on('$locationChangeCompleted', function() {
1103+
$rootScope.$on('$locationChangeSuccess', function() {
11041104
throw new Error('after cancalation in html5 mode');
11051105
});
11061106

0 commit comments

Comments
 (0)