From 43d9773fae22044a5567205ba19f2f49374679e4 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 1 Feb 2022 20:19:04 +1100 Subject: [PATCH] Fixes for tests --- tests/Feature/CompanyTest.php | 3 +++ tests/MockAccountData.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Feature/CompanyTest.php b/tests/Feature/CompanyTest.php index af604cbb67ad..ed3e3f7cc6b9 100644 --- a/tests/Feature/CompanyTest.php +++ b/tests/Feature/CompanyTest.php @@ -50,6 +50,9 @@ class CompanyTest extends TestCase { $this->withoutMiddleware(PasswordProtection::class); + $cc = Company::first(); + $cc->delete(); + $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token, diff --git a/tests/MockAccountData.php b/tests/MockAccountData.php index cfc1955e475f..7c0155185bc9 100644 --- a/tests/MockAccountData.php +++ b/tests/MockAccountData.php @@ -186,8 +186,8 @@ trait MockAccountData $this->account->save(); $this->company = Company::factory()->create([ - 'account_id' => $this->account->id, - ]); + 'account_id' => $this->account->id, + ]); $this->company->client_registration_fields = ClientRegistrationFields::generate();