From 9cfc03133fe21d582776cad16a5c233bb814bcbd Mon Sep 17 00:00:00 2001 From: KNaveenraj-ladybird Date: Wed, 25 Oct 2023 18:13:25 +0530 Subject: [PATCH] commit-3 --- tests/Unit/ExampleTest.php | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index cfe375dcb..7834c881e 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -2,10 +2,6 @@ namespace Tests\Unit; -use App\User; -use Faker\Factory as FakerFactory; -use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Str; use Tests\TestCase; class ExampleTest extends TestCase @@ -19,32 +15,4 @@ class ExampleTest extends TestCase { $this->assertTrue(true); } - - public function test_store_user() - { - $faker = FakerFactory::create(); - - //Create User -> Agent - $str = Str::random(10); - $password = Hash::make($str); - $email = $faker->unique()->email(); - $user = new User([ - 'first_name' => $faker->firstName(), - 'last_name' => $faker->lastName(), - 'email' => $email, - 'user_name' => $faker->unique()->userName(), - 'password' => $password, - 'active' => 1, - 'role' => 'user', - ]); - $user->save(); - - // Check if data is inserted - $this->assertDatabaseHas('users', ['email' => $email]); - - // Authenticate as the created user - $this->actingAs($user); - - $this->assertAuthenticated(); - } }