Skip to content

Commit c3ed538

Browse files
author
scottjehl
committed
unit test for path.isExternal
1 parent 1156045 commit c3ed538

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/unit/navigation/navigation_core.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
same( $.mobile.path.stripHash( "#bar" ), "bar", "returns a hash without the # prefix");
8181

8282
});
83+
84+
test( "path.isExternal is working properly", function(){
85+
same( $.mobile.path.isExternal( location.href ), false, "same domain is not external" );
86+
same( $.mobile.path.isExternal( "http://example.com" ), true, "example.com is external" );
87+
});
8388

8489

8590
test( "path.isExternal method is working properly", function(){

0 commit comments

Comments
 (0)