From b246fb48faa62b43c900a3390b7e870f95c51e98 Mon Sep 17 00:00:00 2001 From: John Bender Date: Sat, 26 Feb 2011 23:27:41 -0800 Subject: [PATCH] tests for data url init default --- tests/unit/init/index.html | 5 ++++- tests/unit/init/init_core.js | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/unit/init/index.html b/tests/unit/init/index.html index 27001694..eab3e057 100644 --- a/tests/unit/init/index.html +++ b/tests/unit/init/index.html @@ -25,7 +25,10 @@
-
+
+
+ +
diff --git a/tests/unit/init/init_core.js b/tests/unit/init/init_core.js index 4af57e19..f1312af3 100644 --- a/tests/unit/init/init_core.js +++ b/tests/unit/init/init_core.js @@ -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);