mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
test($location): fix tests borked during event renaming
This commit is contained in:
parent
5d70e4a89c
commit
d37d595b67
1 changed files with 4 additions and 4 deletions
|
|
@ -1007,7 +1007,7 @@ describe('$location', function() {
|
|||
$log.info('before', newUrl, oldUrl, $browser.url());
|
||||
event.preventDefault();
|
||||
});
|
||||
$rootScope.$on('$locationChangeCompleted', function(event, newUrl, oldUrl) {
|
||||
$rootScope.$on('$locationChangeSuccess', function(event, newUrl, oldUrl) {
|
||||
throw Error('location should have been canceled');
|
||||
});
|
||||
|
||||
|
|
@ -1026,7 +1026,7 @@ describe('$location', function() {
|
|||
expect($browser.url()).toEqual('http://server/');
|
||||
}));
|
||||
|
||||
it ('should fire $locationChangeCompleted event when change from browser location bar',
|
||||
it ('should fire $locationChangeSuccess event when change from browser location bar',
|
||||
inject(function($log, $location, $browser, $rootScope) {
|
||||
$rootScope.$apply(); // clear initial $locationChangeStart
|
||||
|
||||
|
|
@ -1068,7 +1068,7 @@ describe('$location', function() {
|
|||
event.preventDefault();
|
||||
log += '$locationChangeStart';
|
||||
});
|
||||
$rootScope.$on('$locationChangeCompleted', function() {
|
||||
$rootScope.$on('$locationChangeSuccess', function() {
|
||||
throw new Error('after cancellation in hashbang mode');
|
||||
});
|
||||
|
||||
|
|
@ -1100,7 +1100,7 @@ describe('$location', function() {
|
|||
event.preventDefault();
|
||||
log += '$locationChangeStart';
|
||||
});
|
||||
$rootScope.$on('$locationChangeCompleted', function() {
|
||||
$rootScope.$on('$locationChangeSuccess', function() {
|
||||
throw new Error('after cancalation in html5 mode');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue