From 70cc220337ba4f225560a77c546797abcafe134e Mon Sep 17 00:00:00 2001 From: Zain Fauzan Rofie Azizi Date: Fri, 29 Jun 2018 11:04:37 +0800 Subject: [PATCH] rename test --- app/Http/Controllers/DeliveryInfoController.php | 5 ----- app/Warehouse.php | 5 ----- tests/Unit/DeliveryinfoTest.php | 3 +-- tests/{warehouseTest.php => Unit/WarehouseTest.php} | 2 +- tests/Unit/contactTest.php | 2 +- 5 files changed, 3 insertions(+), 14 deletions(-) rename tests/{warehouseTest.php => Unit/WarehouseTest.php} (98%) diff --git a/app/Http/Controllers/DeliveryInfoController.php b/app/Http/Controllers/DeliveryInfoController.php index f99f4ef..f68ea4c 100644 --- a/app/Http/Controllers/DeliveryInfoController.php +++ b/app/Http/Controllers/DeliveryInfoController.php @@ -32,11 +32,6 @@ class DeliveryinfoController extends Controller { $deliveryinfo = Deliveryinfo::where('com_id', Auth::user()->company())->where('id', $id)->first(); - if (!$deliveryinfo) - { - return response()->json(['message'=>'Access Denied!'], 404); - } - $deliveryinfos = DB::table('deliveryinfos') ->select('id', 'branch', 'deli_info', 'address', 'city', 'postcode', 'state', 'country', 'contact_person', 'contact_person_no', 'com_id') ->where('com_id', Auth::user()->company()) diff --git a/app/Warehouse.php b/app/Warehouse.php index 8649c3c..a85af99 100644 --- a/app/Warehouse.php +++ b/app/Warehouse.php @@ -8,9 +8,4 @@ class Warehouse extends Model { protected $fillable = ['city', 'address','zip','state','contact_person','contact_person_no','branch','country','com_id']; - public function contact(){ - - return $this->hasMany(App/Contact); - - } } diff --git a/tests/Unit/DeliveryinfoTest.php b/tests/Unit/DeliveryinfoTest.php index 22edcfd..7bfa688 100644 --- a/tests/Unit/DeliveryinfoTest.php +++ b/tests/Unit/DeliveryinfoTest.php @@ -81,6 +81,5 @@ class DeliveryinfoTest extends TestCase $response->assertStatus(204); } - - + } diff --git a/tests/warehouseTest.php b/tests/Unit/WarehouseTest.php similarity index 98% rename from tests/warehouseTest.php rename to tests/Unit/WarehouseTest.php index f6f683d..1001257 100644 --- a/tests/warehouseTest.php +++ b/tests/Unit/WarehouseTest.php @@ -1,6 +1,6 @@