#4-public-user-profile
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user