Nafies Luthfi
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with
67 additions and
67 deletions
-
routes/web.php
-
tests/Feature/Cart/CartControllerTest.php
-
tests/Feature/Cart/SearchProductsTest.php
|
|
|
@ -72,9 +72,9 @@ Route::group(['middleware' => 'auth'], function () { |
|
|
|
/* |
|
|
|
* Backup Restore Database Routes |
|
|
|
*/ |
|
|
|
Route::post('backups/upload', ['as'=>'backups.upload', 'uses'=>'BackupsController@upload']); |
|
|
|
Route::post('backups/{fileName}/restore', ['as'=>'backups.restore', 'uses'=>'BackupsController@restore']); |
|
|
|
Route::get('backups/{fileName}/dl', ['as'=>'backups.download', 'uses'=>'BackupsController@download']); |
|
|
|
Route::post('backups/upload', ['as' => 'backups.upload', 'uses' => 'BackupsController@upload']); |
|
|
|
Route::post('backups/{fileName}/restore', ['as' => 'backups.restore', 'uses' => 'BackupsController@restore']); |
|
|
|
Route::get('backups/{fileName}/dl', ['as' => 'backups.download', 'uses' => 'BackupsController@download']); |
|
|
|
Route::resource('backups', 'BackupsController', ['except' => ['create', 'show', 'edit']]); |
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
@ -21,8 +21,8 @@ class CartControllerTest extends TestCase |
|
|
|
|
|
|
|
$cart = new CartCollection(); |
|
|
|
|
|
|
|
$response = $this->post(route('cart.add'), ['create-cash-draft'=> trans('transaction.create_cash')]); |
|
|
|
$response = $this->post(route('cart.add'), ['create-credit-draft'=> trans('transaction.create_credit')]); |
|
|
|
$response = $this->post(route('cart.add'), ['create-cash-draft' => trans('transaction.create_cash')]); |
|
|
|
$response = $this->post(route('cart.add'), ['create-credit-draft' => trans('transaction.create_credit')]); |
|
|
|
$response->assertSessionHas('transactions.drafts'); |
|
|
|
|
|
|
|
$cashDraft = $cart->content()->first(); |
|
|
|
|
|
|
|
@ -29,7 +29,7 @@ class SearchProductsTest extends TestCase |
|
|
|
|
|
|
|
$response = $this->post(route('api.products.search'), [ |
|
|
|
'query' => 'Bis', |
|
|
|
'draftType'=> $draft->type, |
|
|
|
'draftType' => $draft->type, |
|
|
|
'draftKey' => $draft->draftKey, |
|
|
|
]); |
|
|
|
|
|
|
|
|