snipe-it/tests/Feature/Users/Api/ViewUserTest.php
2024-08-06 20:25:22 +00:00

24 lines
480 B
PHP

<?php
namespace Tests\Feature\Users\Api;
use App\Models\Company;
use App\Models\User;
use Illuminate\Testing\Fluent\AssertableJson;
use Laravel\Passport\Passport;
use Tests\TestCase;
class ViewUserTest extends TestCase
{
public function testCanReturnUser(): void
{
$user = User::factory()->create();
$this->actingAsForApi(User::factory()->viewUsers()->create())
->getJson(route('api.users.show', $user))
->assertOk();
}
}