mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-17 11:01:06 +00:00
tests for data url init default
This commit is contained in:
parent
c828cf1f64
commit
b246fb48fa
2 changed files with 13 additions and 3 deletions
|
|
@ -25,7 +25,10 @@
|
|||
<ol id="qunit-tests">
|
||||
</ol>
|
||||
|
||||
<div data-role="page">
|
||||
<div data-role="page" id="foo">
|
||||
</div>
|
||||
|
||||
<div data-role="page" id="bar" data-url="bak">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/*
|
||||
* mobile init tests
|
||||
*/
|
||||
|
||||
(function($){
|
||||
var mobilePage = undefined, mobileSelect = undefined,
|
||||
libName = 'jquery.mobile.init.js',
|
||||
|
|
@ -121,5 +120,13 @@
|
|||
stop();
|
||||
$.testHelper.reloadLib(libName);
|
||||
});
|
||||
});
|
||||
|
||||
test( "pages without a data-url attribute have it set to their id", function(){
|
||||
same($("#foo").data('url'), "foo");
|
||||
});
|
||||
|
||||
test( "pages with a data-url attribute are left with the original value", function(){
|
||||
same($("#bar").data('url'), "bak");
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Reference in a new issue