[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit FormSubmitTest.java,1.27,1.28
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-11-08 01:59:41
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv31885/test/com/meterware/httpunit
Modified Files:
FormSubmitTest.java
Log Message:
Send URL parameters with no-action form submission
Index: FormSubmitTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/FormSubmitTest.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- FormSubmitTest.java 8 Oct 2002 17:45:13 -0000 1.27
+++ FormSubmitTest.java 8 Nov 2002 01:59:38 -0000 1.28
@@ -475,6 +475,21 @@
}
+ public void testNoActionSuppliedWhenBaseHasParams() throws Exception {
+ defineResource( "abc/form?param1=value¶m2=value", "<form name=\"test\">" +
+ " <input type=\"text\" name=\"aTextField\">" +
+ " <input type=\"submit\" name=\"apply\" value=\"Apply\">" +
+ "</form>" );
+
+ WebResponse wr = _wc.getResponse( getHostPath() + "/abc/form?param1=value¶m2=value" );
+ WebForm form = wr.getForms()[0];
+ WebRequest req = form.getRequest( "apply" );
+ req.setParameter( "aTextField", "test" );
+ assertEquals( getHostPath() + "/abc/form?param1=value¶m2=value&aTextField=test&apply=Apply",
+ req.getURL().toExternalForm() );
+ }
+
+
public void testPostActionParametersAfterSetAction() throws Exception {
defineWebPage( "abc/form", "<form name=\"test\" method='POST' action='stop?ready=yes'>" +
" <input type=\"text\" name=\"aTextField\">" +
|