mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tests
This commit is contained in:
parent
4a3bd027ad
commit
81825cc063
@ -55,10 +55,6 @@ class GeneratesConvertedQuoteCounterTest extends TestCase
|
||||
public function testCounterExtraction()
|
||||
{
|
||||
|
||||
$user = User::whereEmail('user@example.com')->first();
|
||||
|
||||
$user_id = $user->id;
|
||||
|
||||
$this->account = Account::factory()->create([
|
||||
'hosted_client_count' => 1000,
|
||||
'hosted_company_count' => 1000
|
||||
@ -67,6 +63,18 @@ class GeneratesConvertedQuoteCounterTest extends TestCase
|
||||
$this->account->num_users = 3;
|
||||
$this->account->save();
|
||||
|
||||
$user = User::whereEmail('user@example.com')->first();
|
||||
|
||||
if (! $user) {
|
||||
$user = User::factory()->create([
|
||||
'account_id' => $this->account->id,
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
'email' => 'user@example.com',
|
||||
]);
|
||||
}
|
||||
|
||||
$user_id = $user->id;
|
||||
|
||||
$this->company = Company::factory()->create([
|
||||
'account_id' => $this->account->id,
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user