|
1 | 1 | describe("UrlRouter", function () {
|
2 | 2 |
|
3 |
| - var $urp, $ur, location, match, scope; |
| 3 | + var $urp, $lp, $ur, location, match, scope; |
4 | 4 |
|
5 | 5 | describe("provider", function () {
|
6 | 6 |
|
@@ -46,8 +46,9 @@ describe("UrlRouter", function () {
|
46 | 46 | describe("service", function() {
|
47 | 47 |
|
48 | 48 | beforeEach(function() {
|
49 |
| - angular.module('ui.router.router.test', function() {}).config(function ($urlRouterProvider) { |
| 49 | + angular.module('ui.router.router.test', function() {}).config(function ($urlRouterProvider, $locationProvider) { |
50 | 50 | $urp = $urlRouterProvider;
|
| 51 | + $lp = $locationProvider; |
51 | 52 |
|
52 | 53 | $urp.rule(function ($injector, $location) {
|
53 | 54 | var path = $location.path();
|
@@ -198,6 +199,15 @@ describe("UrlRouter", function () {
|
198 | 199 | expect($urlRouter.href(matcher, { param: 1138 })).toBe('#/foo/1138');
|
199 | 200 | expect($urlRouter.href(matcher, { param: 5 })).toBeNull();
|
200 | 201 | }));
|
| 202 | + |
| 203 | + it('should handle the new html5Mode object config from Angular 1.3', inject(function($urlRouter) { |
| 204 | + |
| 205 | + $lp.html5Mode({ |
| 206 | + enabled: false |
| 207 | + }); |
| 208 | + |
| 209 | + expect($urlRouter.href(new UrlMatcher('/hello'))).toBe('#/hello'); |
| 210 | + })); |
201 | 211 | });
|
202 | 212 | });
|
203 | 213 |
|
|
0 commit comments