snipe-it/tests/Feature/Users/Api/ViewUserTest.php
snipe 060b17df01 Pulled duplicated test
Signed-off-by: snipe <snipe@snipe.net>
2024-06-22 20:34:49 +01:00

24 lines
474 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()
{
$user = User::factory()->create();
$this->actingAsForApi(User::factory()->viewUsers()->create())
->getJson(route('api.users.show', $user))
->assertOk();
}
}