In the browser, login works fine using the same user as in the test
Regardless of using the seeded data, or creating the user in the test, I'm getting Unauthenticated when testing Index
test
public function admin_user_can_access_nova()
{
$this->be(User::create([
'name' => 'admin',
'email' => '[email protected]',
'password' => bcrypt('Test1234'),
]));
$response = $this->novaIndex('users');
$response->assertOk();
$response->assertCanView();
$response->assertCanCreate();
$response->assertCanUpdate();
$response->assertCanDelete();
$response->assertCanForceDelete();
$response->assertCanRestore();
}
In NovaServiceProvider, even I allow all users to debug
protected function gate()
{
Gate::define('viewNova', function ($user) {
return true;
});
}
PHPUnit
There was 1 error:
1) Tests\Feature\NovaTest::admin_user_can_access_nova
Laravel\Nova\Exceptions\AuthenticationException: Unauthenticated.
Environment:
Homestead 10
Laravel 7
Nova 3.14
In the browser, login works fine using the same user as in the test
Regardless of using the seeded data, or creating the user in the test, I'm getting Unauthenticated when testing Index
test
In NovaServiceProvider, even I allow all users to debug
PHPUnit
Environment: