From 1e8e816abc43ea74e0aa9832d1fd08ac86c78770 Mon Sep 17 00:00:00 2001 From: Kyrch Date: Sat, 18 Nov 2023 01:34:44 -0300 Subject: [PATCH] test: fixed the password validator test (#612) --- .../Actions/Fortify/CreateNewUserTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Feature/Actions/Fortify/CreateNewUserTest.php b/tests/Feature/Actions/Fortify/CreateNewUserTest.php index 78a17810a..8b0e62ca5 100644 --- a/tests/Feature/Actions/Fortify/CreateNewUserTest.php +++ b/tests/Feature/Actions/Fortify/CreateNewUserTest.php @@ -52,7 +52,7 @@ public function testUsernameAlphaDash(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker->password(20), @@ -82,7 +82,7 @@ public function testUsernameUnique(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $name, @@ -104,7 +104,7 @@ public function testCreated(): void { $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker()->word(), @@ -140,7 +140,7 @@ public function testCreatedIfNotFlaggedByOpenAI(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker()->word(), @@ -170,7 +170,7 @@ public function testCreatedIfOpenAIFails(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker()->word(), @@ -208,7 +208,7 @@ public function testValidationErrorWhenFlaggedByOpenAI(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker()->word(), @@ -236,7 +236,7 @@ public function testDisposableEmail(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker()->word(), @@ -262,7 +262,7 @@ public function testIndisposableEmail(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker()->word(), @@ -294,7 +294,7 @@ public function testEmailUnique(): void $action = new CreateNewUser(); - $password = $this->faker->password(20); + $password = $this->faker->password(18) . $this->faker->randomDigit() . $this->faker->randomElement(['!', '.', '@', '#']); $action->create([ User::ATTRIBUTE_NAME => $this->faker->word(),