tipo: modificación del cpanel y gitignore de la carpeta vendor
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Laravel\Jetstream\Features;
|
||||
|
||||
test('user accounts can be deleted', function () {
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
$this->delete('/user', [
|
||||
'password' => 'password',
|
||||
]);
|
||||
|
||||
expect($user->fresh())->toBeNull();
|
||||
})->skip(function () {
|
||||
return ! Features::hasAccountDeletionFeatures();
|
||||
}, 'Account deletion is not enabled.');
|
||||
|
||||
test('correct password must be provided before account can be deleted', function () {
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
$this->delete('/user', [
|
||||
'password' => 'wrong-password',
|
||||
]);
|
||||
|
||||
expect($user->fresh())->not->toBeNull();
|
||||
})->skip(function () {
|
||||
return ! Features::hasAccountDeletionFeatures();
|
||||
}, 'Account deletion is not enabled.');
|
||||
Reference in New Issue
Block a user