Navigation Menu

Skip to content

Commit

Permalink
Use done_testing() and test if addButton called twice nukues buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Oct 3, 2011
1 parent 3de9a22 commit 259a42b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions t/Form/ButtonGroup.t
Expand Up @@ -27,12 +27,11 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests

plan tests => 6; # Increment this number for each test you create

#----------------------------------------------------------------------------
# put your tests here

use_ok( 'WebGUI::Form::ButtonGroup' );
use WebGUI::Form::ButtonGroup;
use WebGUI::FormBuilder;

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

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

done_testing();

#----------------------------------------------------------------------------
# Test collateral
Expand Down

0 comments on commit 259a42b

Please sign in to comment.