Login Test - Laravel
I'm new to laravel and was attempting to test a user login but since I've started using in memory sqlite I've been having problems. My Code:
$user = factory(App\User::class)->create ([ 'email'=>'[email protected]', 'password'=>'passwordtest' ]); $this->visit('/auth/login') ->type('[email protected]', 'email') ->type('passwordtest', 'password') ->press('Login') ->seePageIs('/home');
When I run this code it never makes it past the login page. Anyone know what I'm doing wrong?
You need to encrypt the password:
$user = factory(App\User::class)->create ([ 'email'=>'[email protected]', 'password'=>bcrypt('passwordtest') ]);
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?