Adjust test to match code. Only catch exceptions of WebGUI::Error type.

This commit is contained in:
Colin Kuskie 2009-07-08 15:48:54 -07:00
parent 86be7f2abc
commit 70cc313e1e

View file

@ -206,7 +206,7 @@ $properties = $driver->get();
$properties->{sourceCountry} = 'United States'; $properties->{sourceCountry} = 'United States';
$driver->update($properties); $driver->update($properties);
eval { $driver->calculate() }; eval { $driver->calculate() };
$e = Exception::Class->caught(); $e = WebGUI::Error->caught();
isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no userId'); isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no userId');
cmp_deeply( cmp_deeply(
$e, $e,
@ -346,7 +346,7 @@ $properties->{licenseNo} = $license;
$properties->{sourceZip} = '97123'; $properties->{sourceZip} = '97123';
$properties->{sourceCountry} = 'United States'; $properties->{sourceCountry} = 'United States';
$properties->{shipService} = '03'; $properties->{shipService} = '03';
$properties->{pickupCode} = '01'; $properties->{pickupType} = '01';
$driver->update($properties); $driver->update($properties);
$driver->testMode(1); $driver->testMode(1);