From 57b62a988ab36c513ae24593336c5ed2c775096c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 30 May 2021 21:46:30 +1000 Subject: [PATCH] Fixes for tests --- tests/Feature/Import/ImportCompanyTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Import/ImportCompanyTest.php b/tests/Feature/Import/ImportCompanyTest.php index c0360ab9e8aa..ae3b5d3ce750 100644 --- a/tests/Feature/Import/ImportCompanyTest.php +++ b/tests/Feature/Import/ImportCompanyTest.php @@ -65,7 +65,7 @@ class ImportCompanyTest extends TestCase { use MakesHash; use DatabaseTransactions; - + public $account; public $company; public $backup_json_object; @@ -101,6 +101,13 @@ class ImportCompanyTest extends TestCase $this->backup_json_object = json_decode(file_get_contents($backup_json_file)); + Credit::all()->each(function($credit){ + $credit->forceDelete(); + }); + + CreditInvitation::all()->each(function($credit){ + $credit->forceDelete(); + }); } public function testBackupJsonRead() @@ -671,7 +678,7 @@ class ImportCompanyTest extends TestCase ['user_id', 'client_contact_id', 'company_id', 'id', 'hashed_id', 'credit_id'], [ ['users' => 'user_id'], - ['quotes' => 'credit_id'], + ['credits' => 'credit_id'], ['client_contacts' => 'client_contact_id'], ], 'credit_invitations',