Use done_testing() and test if addButton called twice nukues buttons.
This commit is contained in:
parent
3de9a22bc4
commit
259a42bc0b
1 changed files with 6 additions and 3 deletions
|
|
@ -27,12 +27,11 @@ my $session = WebGUI::Test->session;
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
plan tests => 6; # Increment this number for each test you create
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# put your tests here
|
# put your tests here
|
||||||
|
|
||||||
use_ok( 'WebGUI::Form::ButtonGroup' );
|
use WebGUI::Form::ButtonGroup;
|
||||||
|
use WebGUI::FormBuilder;
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# buttons as params
|
# buttons as params
|
||||||
|
|
@ -67,6 +66,10 @@ cmp_deeply(
|
||||||
my $html = $bg->toHtml;
|
my $html = $bg->toHtml;
|
||||||
like( $html, qr/onetwothree/, 'buttons rendered without extras between or around' );
|
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
|
# Test collateral
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue