added current password to the password changing form

This commit is contained in:
Čarodej
2022-01-21 07:41:26 +01:00
parent 6b71eabfa2
commit 4fc61afc11
8 changed files with 131 additions and 67 deletions

View File

@@ -268,7 +268,7 @@ class SignFlowTest extends TestCase
public function it_login_user()
{
$user = User::factory()
->create(['email' => 'john@doe.com']);
->create();
$this->postJson('/login', [
'email' => $user->email,

View File

@@ -72,12 +72,20 @@ class UserAccountTest extends TestCase
$this
->actingAs($user)
->postJson('/api/user/password', [
'current_password' => 'secret',
'current' => 'secret',
'password' => 'VerySecretPassword',
'password_confirmation' => 'VerySecretPassword',
])->assertStatus(204);
// TODO: login s novym heslom
$this
->actingAs($user)
->postJson('/logout')
->assertStatus(204);
$this->postJson('/login', [
'email' => $user->email,
'password' => 'VerySecretPassword',
])->assertStatus(200);
}
/**