diff --git a/app/Import/Providers/BaseImport.php b/app/Import/Providers/BaseImport.php index 7badec42d0..5d9957bbdc 100644 --- a/app/Import/Providers/BaseImport.php +++ b/app/Import/Providers/BaseImport.php @@ -209,7 +209,7 @@ class BaseImport 'error' => $message, ]; - nlog($ex->getMessage()); + nlog("Ingest {$ex->getMessage()}"); } } diff --git a/app/Import/Providers/Csv.php b/app/Import/Providers/Csv.php index dd1ee1f002..408d6be43b 100644 --- a/app/Import/Providers/Csv.php +++ b/app/Import/Providers/Csv.php @@ -166,8 +166,7 @@ class Csv extends BaseImport implements ImportInterface return; } -nlog($data); - + $this->request_name = StorePaymentRequest::class; $this->repository_name = PaymentRepository::class; $this->factory_name = PaymentFactory::class; @@ -179,8 +178,6 @@ nlog($data); $payment_count = $this->ingest($data, $entity_type); -nlog($payment_count); - $this->entity_count['payments'] = $payment_count; } diff --git a/tests/Feature/Shop/ShopInvoiceTest.php b/tests/Feature/Shop/ShopInvoiceTest.php index 09b250731d..9bc064fd1d 100644 --- a/tests/Feature/Shop/ShopInvoiceTest.php +++ b/tests/Feature/Shop/ShopInvoiceTest.php @@ -145,7 +145,7 @@ class ShopInvoiceTest extends TestCase $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-COMPANY-KEY' => $this->company->company_key, - ])->post('/api/v1/shop/clients/', $data); + ])->postJson('/api/v1/shop/clients/', $data); $response->assertStatus(200); $arr = $response->json(); @@ -165,7 +165,7 @@ class ShopInvoiceTest extends TestCase $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-COMPANY-KEY' => $this->company->company_key, - ])->post('/api/v1/shop/clients/', $data); + ])->postJson('/api/v1/shop/clients/', $data); $response->assertStatus(200); $arr = $response->json(); @@ -180,7 +180,7 @@ class ShopInvoiceTest extends TestCase $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-COMPANY-KEY' => $this->company->company_key, - ])->post('/api/v1/shop/invoices/', $invoice_data); + ])->postJson('/api/v1/shop/invoices/', $invoice_data); $response->assertStatus(200); $arr = $response->json();