1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for tests

This commit is contained in:
David Bomba 2021-11-10 09:11:56 +11:00
parent d0be8f744c
commit 39ab665ce8
4 changed files with 6 additions and 0 deletions

View File

@ -297,6 +297,8 @@ class ClientTest extends TestCase
$company_token->account_id = $account->id;
$company_token->name = $user->first_name.' '.$user->last_name;
$company_token->token = Str::random(64);
$company_token->is_system = true;
$company_token->save();
$this->token = $company_token->token;
@ -353,6 +355,7 @@ class ClientTest extends TestCase
$company_token->account_id = $account->id;
$company_token->name = $user->first_name.' '.$user->last_name;
$company_token->token = Str::random(64);
$company_token->is_system = true;
$company_token->save();
$this->token = $company_token->token;

View File

@ -160,6 +160,7 @@ class LoginTest extends TestCase
$company_token->account_id = $account->id;
$company_token->name = $user->first_name.' '.$user->last_name;
$company_token->token = \Illuminate\Support\Str::random(64);
$company_token->is_system = true;
$company_token->save();
$user->companies()->attach($company->id, [

View File

@ -167,6 +167,7 @@ class UserTest extends TestCase
$company_token->account_id = $this->account->id;
$company_token->name = 'test token';
$company_token->token = \Illuminate\Support\Str::random(64);
$company_token->is_system = true;
$company_token->save();
/*Manually link this user to the company*/

View File

@ -128,6 +128,7 @@ class CompanyLedgerTest extends TestCase
$company_token->account_id = $this->account->id;
$company_token->name = 'test token';
$company_token->token = $this->token;
$company_token->is_system = true;
$company_token->save();
$this->client = Client::factory()->create([