Valiadate inputs to create.

This commit is contained in:
Colin Kuskie 2008-02-22 00:15:44 +00:00
parent 6cc51fa176
commit 3f4aed78d2
2 changed files with 23 additions and 7 deletions

View file

@ -28,7 +28,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
my $tests = 3;
my $tests = 4;
plan tests => 1 + $tests;
#----------------------------------------------------------------------------
@ -96,8 +96,14 @@ cmp_deeply(
#
#######################################################################
#my $driver = WebGUI::Shop::ShipDriver->create($session);
#
my $driver;
eval { $driver = WebGUI::Shop::ShipDriver->create($session); };
like ($@, qr/You must pass a hashref of options to create a new ShipDriver object/, 'create croaks without a hashref of options');
eval { $driver = WebGUI::Shop::ShipDriver->create($session, {}); };
like ($@, qr/You must pass a hashref of options to create a new ShipDriver object/, 'create croaks with an empty hashref of options');
#isa_ok($driver, 'WebGUI::Shop::ShipDriver');
#
#isa_ok($driver->session, 'WebGUI::Session', 'session method returns a session object');