Permalink
Browse files

Mask: Adding a unit test for refresh method

  • Loading branch information...
1 parent d86229d commit d40039507efb910349cc70e37b4bfcc98f71fb46 @gnarf gnarf committed Jul 31, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/unit/mask/mask_methods.js
@@ -2,4 +2,15 @@
module( "mask: methods" );
+test( "refresh", function() {
+ expect( 1 );
+
+ var input = $( "#mask1" ).mask({
+ mask: "99/99/99"
+ });
+
+ input.val( "123456" ).mask( "refresh" );
+ equal( input.val(), "12/34/56", "Refresh re-parsed the value of the input" );
+});
+
}( jQuery ) );

0 comments on commit d400395

Please sign in to comment.