[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit FormSubmitTest.java,1.18,1.19
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-08-05 15:20:55
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit In directory usw-pr-cvs1:/tmp/cvs-serv28820/test/com/meterware/httpunit Modified Files: FormSubmitTest.java Log Message: Correct handling of settable form action Index: FormSubmitTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/FormSubmitTest.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- FormSubmitTest.java 17 Jun 2002 18:43:15 -0000 1.18 +++ FormSubmitTest.java 5 Aug 2002 15:20:51 -0000 1.19 @@ -110,6 +110,19 @@ } + public void testSubmitStringAfterSetAction() throws Exception { + defineWebPage( "Default", "<form method=GET action = \"/ask\">" + + "<Input type=text name=age>" + + "<Input type=submit value=Go>" + + "</form>" ); + WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" ); + page.getForms()[0].getScriptableObject().setAction( "tell" ); + WebRequest request = page.getForms()[0].getRequest(); + request.setParameter( "age", "23" ); + assertEquals( getHostPath() + "/tell?age=23", request.getURL().toExternalForm() ); + } + + public void testNoNameSubmitString() throws Exception { defineWebPage( "Default", "<form method=GET action = \"/ask\">" + "<Input type=text value=dontSend>" + |