From b1f1eb0ccd5ac0d8b96d8af4b74a6c581c3b3df8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 17 Sep 2024 07:21:12 +1000 Subject: [PATCH] Fixes for tests --- app/Http/Requests/Company/UpdateCompanyRequest.php | 7 ++++--- tests/Feature/CompanyTest.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Http/Requests/Company/UpdateCompanyRequest.php b/app/Http/Requests/Company/UpdateCompanyRequest.php index de12d404af5c..3f7300fb9b0d 100644 --- a/app/Http/Requests/Company/UpdateCompanyRequest.php +++ b/app/Http/Requests/Company/UpdateCompanyRequest.php @@ -98,9 +98,10 @@ class UpdateCompanyRequest extends Request $input['portal_domain'] = rtrim(strtolower($input['portal_domain']), "/"); } - if (isset($input['expense_mailbox']) && Ninja::isHosted() && !($this->company->account->isPaid() && $this->company->account->plan == 'enterprise')) { - unset($input['expense_mailbox']); - } + // /** Disabled on the hosted platform */ + // if (isset($input['expense_mailbox']) && Ninja::isHosted() && !($this->company->account->isPaid() && $this->company->account->plan == 'enterprise')) { + // unset($input['expense_mailbox']); + // } if (isset($input['settings'])) { $input['settings'] = (array) $this->filterSaveableSettings($input['settings']); diff --git a/tests/Feature/CompanyTest.php b/tests/Feature/CompanyTest.php index fb4eaca42835..fafd348c62c2 100644 --- a/tests/Feature/CompanyTest.php +++ b/tests/Feature/CompanyTest.php @@ -262,7 +262,7 @@ class CompanyTest extends TestCase public function tearDown(): void { - Account::query()->where('id', $this->company->account->id)->delete(); + Account::query()->where('id', $this->company->account_id)->delete(); parent::tearDown(); }