diff options
Diffstat (limited to 't/uncheck_bool_field.t')
-rw-r--r-- | t/uncheck_bool_field.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/uncheck_bool_field.t b/t/uncheck_bool_field.t new file mode 100644 index 0000000..7742165 --- /dev/null +++ b/t/uncheck_bool_field.t @@ -0,0 +1,14 @@ +use strict; +use warnings; +use Test::More qw(no_plan); +use Test::WWW::Mechanize::Catalyst 'ComponentUI'; + +my $mech = Test::WWW::Mechanize::Catalyst->new; +$mech->get_ok('http://localhost/testmodel/baz/id/1/update'); +# print $mech->content, "\n"; +$mech->tick('r-vp-1-field-bool_field:value_string', 1); +$mech->submit_form(button => 'r-vp-1:apply'); +$mech->content_like(qr{checked="checked"}, 'checked'); +$mech->untick('r-vp-1-field-bool_field:value_string', 1); +$mech->submit_form(button => 'r-vp-1:apply'); +$mech->content_unlike(qr{checked="checked"}, 'should not be checked'); |