Fixes for tests

This commit is contained in:
David Bomba 2023-01-19 08:07:12 +11:00
parent a1063f8249
commit ff20b2caf1

View File

@ -108,6 +108,9 @@ class ProductSalesReportTest extends TestCase
'settings' => $settings, 'settings' => $settings,
]); ]);
$this->company->settings = $settings;
$this->company->save();
$this->payload = [ $this->payload = [
'start_date' => '2000-01-01', 'start_date' => '2000-01-01',
'end_date' => '2030-01-11', 'end_date' => '2030-01-11',
@ -125,14 +128,13 @@ class ProductSalesReportTest extends TestCase
$this->assertInstanceOf(ProductSalesExport::class, $pl); $this->assertInstanceOf(ProductSalesExport::class, $pl);
$this->account->delete(); // $this->account->delete();
} }
public function testSimpleReport() public function testSimpleReport()
{ {
$this->buildData(); $this->buildData();
$client = Client::factory()->create([ $client = Client::factory()->create([
'user_id' => $this->user->id, 'user_id' => $this->user->id,
'company_id' => $this->company->id, 'company_id' => $this->company->id,
@ -174,7 +176,6 @@ class ProductSalesReportTest extends TestCase
$response = $pl->run(); $response = $pl->run();
$this->assertIsString($response); $this->assertIsString($response);
// nlog($response);
$this->account->delete(); $this->account->delete();
} }