Fix Karma test

This commit is contained in:
Gustavo Maximiliano Cortez 2014-07-31 22:49:11 -03:00
commit dbf812f848
3 changed files with 5 additions and 5 deletions

View file

@ -73,12 +73,14 @@ angular
$idleProvider.idleDuration(15 * 60); // in seconds
$idleProvider.warningDuration(10); // in seconds
})
.run(function($rootScope, $location) {
.run(function($rootScope, $location, $idle) {
$idle.watch();
$rootScope.$on('$routeChangeStart', function(event, next, current) {
if (!util.supports.data) {
$location.path('unsupported');
} else {
if ((!$rootScope.wallet || !$rootScope.wallet.id) && next.validate) {
$idle.unwatch();
$location.path('/');
}
if ($rootScope.wallet && !$rootScope.wallet.isReady()) {