Search code examples
perlunit-testingcgiformbuilder

How to create a submitted CGI::FormBuilder object?


I have a method that takes a cgi object and creates a CGI::FormBuilder object. if it is submitted, does a db connection and process data otherwise, prepopulates some data and renders the form.

I want to write a unit test for it. Therefore, I want to give it a cgi object and it will create a submitted form and process data.

Which parameter must be specified in cgi to do form to be submitted?

Thanks in advance.


Solution

  • Parameter is (submittedname_of_the_form)_(name_of_the_form)