Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
test: fix password length generated by faker
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrunotome committed Sep 6, 2020
1 parent 228da65 commit 97f9400
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions default-structure/tests/Feature/ResetPasswordControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function setUp(): void
public function testSubmitPasswordReset()
{
$token = Password::broker()->createToken($this->user);
$password = $this->faker->password;
$password = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
Expand Down Expand Up @@ -84,12 +84,12 @@ public function testSubmitPasswordResetInvalidEmail()
{
$token = Password::broker()->createToken($this->user);

$password = $this->faker->password;
$password = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
'token' => $token,
'email' => $this->faker->safeEmail,
'email' => $this->faker->word,
'password' => $password,
'password_confirmation' => $password,
])
Expand All @@ -109,7 +109,7 @@ public function testSubmitPasswordResetEmailNotFound()
{
$token = Password::broker()->createToken($this->user);

$password = $this->faker->password;
$password = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
Expand All @@ -129,8 +129,8 @@ public function testSubmitPasswordResetEmailNotFound()
public function testSubmitPasswordResetPasswordMismatch()
{
$token = Password::broker()->createToken($this->user);
$password = $this->faker->password;
$password_confirmation = $this->faker->password;
$password = $this->faker->password(12);
$password_confirmation = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function setUp(): void
public function testSubmitPasswordReset()
{
$token = Password::broker()->createToken($this->user);
$password = $this->faker->password;
$password = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
Expand Down Expand Up @@ -84,7 +84,7 @@ public function testSubmitPasswordResetInvalidEmail()
{
$token = Password::broker()->createToken($this->user);

$password = $this->faker->password;
$password = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
Expand All @@ -109,7 +109,7 @@ public function testSubmitPasswordResetEmailNotFound()
{
$token = Password::broker()->createToken($this->user);

$password = $this->faker->password;
$password = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
Expand All @@ -129,8 +129,8 @@ public function testSubmitPasswordResetEmailNotFound()
public function testSubmitPasswordResetPasswordMismatch()
{
$token = Password::broker()->createToken($this->user);
$password = $this->faker->password;
$password_confirmation = $this->faker->password;
$password = $this->faker->password(12);
$password_confirmation = $this->faker->password(12);

$this
->post(route('api.reset.password'), [
Expand Down

0 comments on commit 97f9400

Please sign in to comment.