mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Add authorization test
This commit is contained in:
parent
695c9d070f
commit
69009e027f
|
@ -10,6 +10,18 @@ use Tests\TestCase;
|
|||
|
||||
class StoreUsersTest extends TestCase
|
||||
{
|
||||
public function testRequiresPermission()
|
||||
{
|
||||
$this->actingAsForApi(User::factory()->create())
|
||||
->postJson(route('api.users.store'), [
|
||||
'first_name' => 'Joe',
|
||||
'username' => 'joe',
|
||||
'password' => 'joe_password',
|
||||
'password_confirmation' => 'joe_password',
|
||||
])
|
||||
->assertForbidden();
|
||||
}
|
||||
|
||||
public function testCompanyIdNeedsToBeInteger()
|
||||
{
|
||||
$company = Company::factory()->create();
|
||||
|
|
Loading…
Reference in a new issue