mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-16 10:33:08 +00:00
added unit test for path.getFilePath
This commit is contained in:
parent
85a6d878eb
commit
fe994b7c0c
1 changed files with 6 additions and 0 deletions
|
|
@ -38,11 +38,17 @@
|
|||
same(called, 2, "change page should be called twice");
|
||||
});
|
||||
|
||||
|
||||
|
||||
test( "path.get method is working properly", function(){
|
||||
same($.mobile.path.get(), window.location.hash, "get method returns location.hash");
|
||||
same($.mobile.path.get( "#foo/bar/baz.html" ), "foo/bar/", "get method with hash arg returns path with no filename or hash prefix");
|
||||
same($.mobile.path.get( "#foo/bar/baz.html/" ), "foo/bar/baz.html/", "last segment of hash is retained if followed by a trailing slash");
|
||||
});
|
||||
|
||||
test( "path.getFilePath method is working properly", function(){
|
||||
same($.mobile.path.getFilePath("foo.html" + "&" $.mobile.subPageUrlKey ), "foo.html", "returns path without sub page key");
|
||||
});
|
||||
|
||||
test( "path.isExternal method is working properly", function(){
|
||||
same($.mobile.path.isExternal("mailto:"), true, "mailto protocol");
|
||||
|
|
|
|||
Loading…
Reference in a new issue