On Tue, May 23, 2017 at 12:12 PM, iaw4 <[email protected]> wrote: > Could someone please post a simple Mojo::Test example that > > - enters text "abc" (or adds "123" at the end of the text already in > the text) into an id'ed input text field of some specific form (also > identified by some id) > - then presses the submit button (identified by some id) or a link > - and checks that the result from this request contains a certain > string > > because my app has state information, I cannot simply test stateless URLs > (which is the example in the tutorial). >
dotan's link to jberger's Galileo is a great Simple Mojo::Test example. See L58 <https://metacpan.org/source/JBERGER/Galileo-0.042/t/basic.t#L58>. Something to note. When you use the $t Test::Mojo object, state will be retained. I can't explain this as well as others on the list and I may not understand it well, but the $t object has access to the previous request and what not. State is, AFAIK, carried thru. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
