[Jifty-commit] jifty branch, master, updated. c55221f1a4d4bc8ebd60b74e860ec44d4da63feb

Jifty commits jifty-commit at lists.jifty.org
Thu Dec 9 12:48:49 EST 2010


The branch, master has been updated
       via  c55221f1a4d4bc8ebd60b74e860ec44d4da63feb (commit)
      from  aa708d8296f13dee3ac5e7c5c7fbbf5d456c2fd3 (commit)

Summary of changes:
 t/Mapper/t/02-api.t |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit c55221f1a4d4bc8ebd60b74e860ec44d4da63feb
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Dec 9 12:46:19 2010 -0500

    Use submit_form_ok() to better match real browsers and avoid warnings
    
    click_button() submitted the button's value with no name which caused
    warnings in HTTP::Body.  submit_form_ok() doesn't submit the button
    value at all, and matches what real browsers do when a submit button is
    unnamed.

diff --git a/t/Mapper/t/02-api.t b/t/Mapper/t/02-api.t
index b0d5302..de32696 100644
--- a/t/Mapper/t/02-api.t
+++ b/t/Mapper/t/02-api.t
@@ -31,7 +31,7 @@ $mech->content_like(qr/got the grail/, "Running the action produces the expected
 # first, test via setting arguments during action creation (which sets
 # sticky values)
 $mech->form_number(2);
-ok($mech->click_button(value => "Do both"));
+$mech->submit_form_ok;
 $mech->content_like(qr/got the grail/i, "Got the grail");
 $mech->content_like(qr/crossed the bridge/i, "And crossed the bridge");
 
@@ -42,6 +42,6 @@ $mech->content_like(qr/J:A:F-castle-(\S+): Aaaaaargh/, "Has the right value name
 
 # And then, the same, but via default_values on the form field
 $mech->form_number(3);
-ok($mech->click_button(value => "Do both"));
+$mech->submit_form_ok;
 $mech->content_like(qr/got the grail/i, "Got the grail");
 $mech->content_like(qr/crossed the bridge/i, "And crossed the bridge");

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list