Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7124

Show
Ignore:
Timestamp:
06/26/07 00:27:30 (1 year ago)
Author:
mislav
Message:

Prototype: additional test for Form#request

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/branches/form/test/unit/form.html

    r7121 r7124  
    100100</form> 
    101101 
    102 <form id="form_focus_hidden" style="display: none"> 
     102<form id="focus_hidden" style="display: none" action=" "> 
    103103  <input type="text" /> 
    104104</form> 
     
    299299      // Form.Element.activate shouldn't raise an exception when the form or field is hidden 
    300300      assertNothingRaised(function() { 
    301         $('form_focus_hidden').focusFirstElement(); 
     301        $('focus_hidden').focusFirstElement(); 
    302302      }); 
    303303    }}, 
     
    401401     
    402402    testFormRequest: function() {with(this) { 
    403       request = $("form").request(); 
     403      var request = $("form").request(); 
    404404      assert($("form").hasAttribute("method")); 
    405405      assert(request.url.include("fixtures/empty.js?val1=4")); 
     
    417417      assert(request.url.endsWith("unit/form.html"), 
    418418        'wrong default action for form element with empty action attribute'); 
     419      request = $("focus_hidden").request({ method: 'post' }); 
     420      assert(request.url.endsWith("unit/form.html"), 
     421        'wrong default action for form element with spaces in action attribute'); 
    419422    }}, 
    420423