aboutsummaryrefslogblamecommitdiffstats
path: root/t/uncheck_bool_field.t
blob: 7742165ae7295addc921dfa6690399b1b7e937cc (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
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');