Adding isVendorInfoComplete method.

This commit is contained in:
Martin Kamerbeek 2009-03-18 15:27:38 +00:00
parent 8da6751407
commit be145261e0
2 changed files with 42 additions and 1 deletions

View file

@ -31,7 +31,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
my $tests = 44;
my $tests = 49;
plan tests => 1 + $tests;
#----------------------------------------------------------------------------
@ -283,6 +283,27 @@ cmp_deeply(
'delete removed the correct vendor'
);
#######################################################################
#
# isVendorInfoComplete
#
#######################################################################
my %completeProps = (
name => 'Esquerita',
userId => $fenceUser->userId,
preferredPaymentType => 'PayPal',
paymentInformation => 'esquerita@example.com',
);
$fence->update( { %completeProps } );
is( $fence->isVendorInfoComplete, 1, 'Vendor information is complete' );
foreach (keys %completeProps ) {
$fence->update( { %completeProps, $_ => undef } );
ok( !$fence->isVendorInfoComplete, "Vendor information is not complete without $_" );
}
undef $guard;
}