aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/urlUtilsSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/urlUtilsSpec.js')
-rw-r--r--test/ng/urlUtilsSpec.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/ng/urlUtilsSpec.js b/test/ng/urlUtilsSpec.js
index 18675ed8..543ff3fb 100644
--- a/test/ng/urlUtilsSpec.js
+++ b/test/ng/urlUtilsSpec.js
@@ -1,7 +1,7 @@
'use strict';
describe('urlUtils', function() {
- describe('parse', function() {
+ describe('urlResolve', function() {
it('should normalize a relative url', function () {
expect(urlResolve("foo").href).toMatch(/^https?:\/\/[^/]+\/foo$/);
});
@@ -14,6 +14,13 @@ describe('urlUtils', function() {
expect(parsed.hostname).not.toBe("");
expect(parsed.pathname).not.toBe("");
});
+
+
+ it('should return pathname as / if empty path provided', function () {
+ //IE counts / as empty, necessary to use / so that pathname is not context.html
+ var parsed = urlResolve('/');
+ expect(parsed.pathname).toBe('/');
+ })
});
describe('isSameOrigin', function() {