mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
33 lines
679 B
PHP
33 lines
679 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\User;
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Tests\TestCase;
|
|
|
|
class UserTest extends TestCase
|
|
{
|
|
use DatabaseMigrations;
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function it_generate_and_store_user()
|
|
{
|
|
$user = User::factory(User::class)
|
|
->create(['role' => 'user']);
|
|
|
|
$this->assertDatabaseHas('users', [
|
|
'id' => $user->id,
|
|
'role' => 'user',
|
|
]);
|
|
|
|
$this->assertDatabaseHas('user_settings', [
|
|
'user_id' => $user->id,
|
|
]);
|
|
}
|
|
}
|