Skip to content

Commit fedb0a7

Browse files
committed
added tests for external link function
1 parent 8a5060d commit fedb0a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/unit/navigation/navigation_core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,10 @@
3737

3838
same(called, 2, "change page should be called twice");
3939
});
40+
41+
test( "check for external link succeeds for when the protocol is included", function(){
42+
same($.mobile.isExternalLink("<a href='mailto:'></a>"), true, "mailto");
43+
same($.mobile.isExternalLink("<a href='http://foo.com'></a>"), true, "http protocol");
44+
same($.mobile.isExternalLink("<a href='foo' rel='external'></a>"), true, "rel=external");
45+
});
4046
})(jQuery);

0 commit comments

Comments
 (0)