File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,12 @@ define([
2828 test ( "_button" , function ( ) {
2929 var myButton , wrapper , _getIconClasses ;
3030
31- myButton = $ . mobile . button ( { } , $ ( "<input type='button' value='my button'>" ) ) ;
31+ // Stub _enhance method so it doesn't actually get called
32+ this . stub ( $ . mobile . button . prototype , "_enhance" ) ;
33+
3234 _getIconClasses = this . stub ( $ . mobile . button . prototype , "_getIconClasses" ) . returns ( "icon-class" ) ;
35+
36+ myButton = $ . mobile . button ( { } , $ ( "<input type='button' value='my button'>" ) ) ;
3337 wrapper = $ . mobile . button . prototype . _button . call ( myButton ) ;
3438 ok ( _getIconClasses . calledOnce , "_getIconClasses should be called once" ) ;
3539 ok ( wrapper . hasClass ( "icon-class" ) , "button wrapper should have class icon-class" ) ;
You can’t perform that action at this time.
0 commit comments