浏览代码

add clearmaskonlostfocus true test

Robin Herbots 12 年之前
父节点
当前提交
c49800c22c
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      qunit/tests.js

+ 9 - 0
qunit/tests.js

@@ -27,6 +27,15 @@ test("inputmask(\"99-99-99\", { clearMaskOnLostFocus: false}", function () {
     $("#testmask").remove();
 });
 
+test("inputmask(\"99-99-99\", { clearMaskOnLostFocus: true}", function () {
+    $('body').append('<input type="text" id="testmask" />');
+    $("#testmask").inputmask("99-99-99", { clearMaskOnLostFocus: true });
+
+    equal(document.getElementById("testmask").value, "", "Result " + document.getElementById("testmask").value);
+
+    $("#testmask").remove();
+});
+
 test("inputmask(\"999.999.999\")", function () {
     $('body').append('<input type="text" id="testmask" />');
     $("#testmask").inputmask("999.999.999");