Initial commit

This commit is contained in:
2024-03-17 14:07:38 +01:00
commit 22ea1930c4
133 changed files with 24036 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Tests\Feature\Auth;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Spatie\Permission\Models\Role;
use Tests\TestCase;
class RegistrationTest extends TestCase
{
use RefreshDatabase;
public function test_new_users_can_register(): void
{
$role = Role::create(['name' => 'user']);
$response = $this->post('/api/v1/register', [
'name' => 'Test User',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
$response->assertCreated();
$response->assertJson(['ok' => true], true);
$role->delete();
}
}