mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Jobs\Account\CreateAccount;
|
|
use App\Models\Account;
|
|
use App\Models\Client;
|
|
use App\Models\User;
|
|
use App\Utils\Traits\UserSessionAttributes;
|
|
use Faker\Factory;
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Session;
|
|
use Tests\TestCase;
|
|
|
|
class ClientTest extends TestCase
|
|
{
|
|
|
|
use DatabaseTransactions;
|
|
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
Session::start();
|
|
|
|
$faker = \Faker\Factory::create();
|
|
|
|
$data = [
|
|
'first_name' => $faker->firstName,
|
|
'last_name' => $faker->lastName,
|
|
'email' => $faker->unique()->safeEmail,
|
|
'password' => 'ALongAndBrilliantPassword123'
|
|
];
|
|
|
|
$this->user = CreateAccount::dispatchNow($data);
|
|
}
|
|
|
|
|
|
/**
|
|
* A valid user can be logged in.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testUserCreated()
|
|
{
|
|
$this->assertTrue($user);
|
|
}
|
|
|
|
|
|
|
|
}
|