From 273728dedb148b762e0afb150a2003925dce5cf1 Mon Sep 17 00:00:00 2001 From: Santi Albo Date: Tue, 28 Jan 2014 15:40:39 +0000 Subject: [PATCH] More tests for angular-ui-router --- angular-ui/angular-ui-router-tests.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/angular-ui/angular-ui-router-tests.ts b/angular-ui/angular-ui-router-tests.ts index f52d35837..5a9c4ad6c 100644 --- a/angular-ui/angular-ui-router-tests.ts +++ b/angular-ui/angular-ui-router-tests.ts @@ -15,14 +15,16 @@ myApp.config(( var matcher: ng.ui.IUrlMatcher = $urlMatcherFactory.compile("/foo/:bar?param1"); $urlRouterProvider - .when('/test', '/list') - .when(/\/test\d/, ($injector: ng.auto.IInjectorService, $location: ng.ILocationService) => { - return '/list'; - }) - .when(matcher, ['$injector', '$location', ($injector: ng.auto.IInjectorService, $location: ng.ILocationService) => { - return false; - }]) - .otherwise("/state1"); + .when('/test', '/list') + .when('/test', '/list') + .when('/test', '/list') + .when(/\/test\d/, '/list') + .when(/\/test\d/, ($injector: ng.auto.IInjectorService, $location: ng.ILocationService) => '/list') + .when(/\/test\d/,['$injector', '$location', ($injector: ng.auto.IInjectorService, $location: ng.ILocationService) => '/list']) + .when(matcher, '/list') + .when(matcher, ($injector: ng.auto.IInjectorService, $location: ng.ILocationService) => '/list') + .when(matcher, ['$injector', '$location', ($injector: ng.auto.IInjectorService, $location: ng.ILocationService) => '/list']) + .otherwise("/state1"); // Now set up the states $stateProvider