Skip to content
Permalink
Browse files

Use done_testing() and test if addButton called twice nukues buttons.

  • Loading branch information...
perlDreamer committed Oct 3, 2011
1 parent 3de9a22 commit 259a42bc0b556a260247210cb35eb3f39e9a7689
Showing with 6 additions and 3 deletions.
  1. +6 −3 t/Form/ButtonGroup.t
@@ -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
@@ -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

0 comments on commit 259a42b

Please sign in to comment.
You can’t perform that action at this time.