Add quick registration test for CAPI. #288
This commit is contained in:
parent
e62c3dc097
commit
9c9018171e
2 changed files with 22 additions and 15 deletions
|
|
@ -55,14 +55,20 @@ class TestAPICommand extends Command
|
|||
'last_name' => 'Last',
|
||||
'mobile_number' => '12345678910',
|
||||
];
|
||||
$api->post('/capi/warranties', $params);
|
||||
//$api->post('/capi/warranties', $params);
|
||||
|
||||
// get all warranties
|
||||
$api->get('/capi/warranties');
|
||||
$params = [
|
||||
'order' => 'DESC',
|
||||
'limit' => '5',
|
||||
'start' => '1',
|
||||
];
|
||||
|
||||
$api->get('/capi/warranties', $params);
|
||||
|
||||
|
||||
// warranty find
|
||||
$api->get('/capi/warranties/' . $serial);
|
||||
//$api->get('/capi/warranties/' . $serial);
|
||||
|
||||
// warranty update
|
||||
$id = 86811;
|
||||
|
|
@ -77,7 +83,7 @@ class TestAPICommand extends Command
|
|||
'last_name' => 'Last',
|
||||
'mobile_number' => '123456789111',
|
||||
];
|
||||
$api->post('/capi/warranties/'. $id, $params);
|
||||
//$api->post('/capi/warranties/'. $id, $params);
|
||||
|
||||
// warranty set privacy policy
|
||||
$id = 86811;
|
||||
|
|
@ -85,7 +91,7 @@ class TestAPICommand extends Command
|
|||
$params = [
|
||||
'privacy_policy_id' => $policy_id,
|
||||
];
|
||||
$api->post('/capi/warranties/' . $id .'/privacypolicy', $params);
|
||||
//$api->post('/capi/warranties/' . $id .'/privacypolicy', $params);
|
||||
|
||||
// warranty claim
|
||||
$id = 86811;
|
||||
|
|
@ -93,27 +99,27 @@ class TestAPICommand extends Command
|
|||
$params = [
|
||||
'serial' => $serial,
|
||||
];
|
||||
$api->post('/capi/warranties/' . $id . '/claim', $params);
|
||||
//$api->post('/capi/warranties/' . $id . '/claim', $params);
|
||||
|
||||
// warranty cancel
|
||||
$id = 86811;
|
||||
$api->get('/capi/warranties/' . $id . '/cancel');
|
||||
//$api->get('/capi/warranties/' . $id . '/cancel');
|
||||
|
||||
// plate warranty
|
||||
$api->get('/capi/plates/' . $plate_num . '/warranties');
|
||||
//$api->get('/capi/plates/' . $plate_num . '/warranties');
|
||||
|
||||
// warranty delete
|
||||
$id = 86811;
|
||||
$api->post('/capi/warranties/' . $id . '/delete');
|
||||
//$api->post('/capi/warranties/' . $id . '/delete');
|
||||
|
||||
// battery
|
||||
$api->get('/capi/battery_brands');
|
||||
$api->get('/capi/battery_sizes');
|
||||
$api->get('/capi/batteries');
|
||||
//$api->get('/capi/battery_brands');
|
||||
//$api->get('/capi/battery_sizes');
|
||||
//$api->get('/capi/batteries');
|
||||
|
||||
// vehicle
|
||||
$api->get('/capi/vehicle_manufacturers');
|
||||
$api->get('/capi/vehicles');
|
||||
//$api->get('/capi/vehicle_manufacturers');
|
||||
//$api->get('/capi/vehicles');
|
||||
|
||||
// privacy policy
|
||||
$privacy_policy_id = 2;
|
||||
|
|
|
|||
|
|
@ -603,7 +603,8 @@ class WarrantyController extends Controller
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// what if serial exists but plate number is different?
|
||||
// new warranty
|
||||
$warranty = new Warranty();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue