Skip to content

Commit 259a42b

Browse files
committedOct 3, 2011
Use done_testing() and test if addButton called twice nukues buttons.
1 parent 3de9a22 commit 259a42b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎t/Form/ButtonGroup.t

+6-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ my $session = WebGUI::Test->session;
2727
#----------------------------------------------------------------------------
2828
# Tests
2929

30-
plan tests => 6; # Increment this number for each test you create
31-
3230
#----------------------------------------------------------------------------
3331
# put your tests here
3432

35-
use_ok( 'WebGUI::Form::ButtonGroup' );
33+
use WebGUI::Form::ButtonGroup;
34+
use WebGUI::FormBuilder;
3635

3736
#----------------------------------------------------------------------------
3837
# buttons as params
@@ -67,6 +66,10 @@ cmp_deeply(
6766
my $html = $bg->toHtml;
6867
like( $html, qr/onetwothree/, 'buttons rendered without extras between or around' );
6968

69+
$bg->addButton("TestButton", { name => "four" } );
70+
like( $bg->toHtml, qr/onetwothreefour/, 'calling addButton twice does not nuke your buttons' );
71+
72+
done_testing();
7073

7174
#----------------------------------------------------------------------------
7275
# Test collateral

0 commit comments

Comments
 (0)
Please sign in to comment.