snipe-it/tests/Feature/Accessories/Api/StoreAccessoryTest.php

18 lines
426 B
PHP

<?php
namespace Tests\Feature\Accessories\Api;
use App\Models\User;
use Tests\Concerns\TestsPermissionsRequirement;
use Tests\TestCase;
class StoreAccessoryTest extends TestCase implements TestsPermissionsRequirement
{
public function testRequiresPermission()
{
$this->actingAsForApi(User::factory()->create())
->postJson(route('api.accessories.store'))
->assertForbidden();
}
}