#4-public-user-profile

This commit is contained in:
2026-05-12 10:57:21 +08:00
parent 53be5221e9
commit b6c9557f83
42 changed files with 2994 additions and 242 deletions

View File

@@ -23,6 +23,7 @@ test('authenticated users can view the user edit page', function () {
->assertSuccessful()
->assertSee('Edit User')
->assertSee($user->name)
->assertSee($user->username)
->assertSee($user->email)
->assertSee('Roles')
->assertSee('Admin')
@@ -39,6 +40,7 @@ test('authenticated users can update a user', function () {
->actingAs($actingUser)
->patch("/user/{$user->id}", [
'name' => 'Updated User',
'username' => 'updated-user',
'email' => 'updated@example.com',
'roles' => [$adminRole->id, $editorRole->id],
]);
@@ -49,6 +51,7 @@ test('authenticated users can update a user', function () {
$user->refresh();
$this->assertSame('Updated User', $user->name);
$this->assertSame('updated-user', $user->username);
$this->assertSame('updated@example.com', $user->email);
expect($user->roles()->pluck('roles.id')->all())
->toMatchArray([$adminRole->id, $editorRole->id]);
@@ -65,6 +68,7 @@ test('user roles can be cleared by submitting no roles', function () {
->actingAs($actingUser)
->patch("/user/{$user->id}", [
'name' => $user->name,
'username' => $user->username,
'email' => $user->email,
]);