implement user profile settings
This commit is contained in:
@@ -2,12 +2,21 @@
|
||||
|
||||
use App\Livewire\Settings\Profile;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
|
||||
use Livewire\Livewire;
|
||||
|
||||
uses(LazilyRefreshDatabase::class);
|
||||
|
||||
test('profile page is displayed', function () {
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
$this->get('/settings/profile')->assertOk();
|
||||
$this->get('/settings/profile')
|
||||
->assertOk()
|
||||
->assertSee('Profile')
|
||||
->assertSee('Name')
|
||||
->assertSee('Email')
|
||||
->assertDontSee('Repository')
|
||||
->assertDontSee('Documentation');
|
||||
});
|
||||
|
||||
test('profile information can be updated', function () {
|
||||
@@ -73,4 +82,4 @@ test('correct password must be provided to delete account', function () {
|
||||
$response->assertHasErrors(['password']);
|
||||
|
||||
expect($user->fresh())->not->toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
use App\Livewire\Settings\Security;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Laravel\Fortify\Features;
|
||||
use Livewire\Livewire;
|
||||
|
||||
uses(LazilyRefreshDatabase::class);
|
||||
|
||||
beforeEach(function () {
|
||||
$this->skipUnlessFortifyHas(Features::twoFactorAuthentication());
|
||||
|
||||
@@ -102,4 +105,4 @@ test('correct password must be provided to update password', function () {
|
||||
->call('updatePassword');
|
||||
|
||||
$response->assertHasErrors(['current_password']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user