I have a problem with a simple test. It always returns a 403 status instead of the expected 200. What am I doing wrong?
The first assertion works as expected, but the second one always returns the same result, 403.
<?php
namespace Tests\Feature;
use NovaTesting\NovaAssertions;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\Models\User;
class UserHasUiAccessTest extends TestCase
{
use NovaAssertions;
/** @test */
function user_has_ui_access()
{
$user = User::factory()->create();
$this->be($user);
$this->assertAuthenticatedAs($user);
$response = $this->novaIndex('users');
$response->assertStatus(200);
}
}
I am running the test on a clean project where I have only installed Laravel 8 and Laravel Nova 3.
Hello,
I have a problem with a simple test. It always returns a 403 status instead of the expected 200. What am I doing wrong?
The first assertion works as expected, but the second one always returns the same result, 403.
I am running the test on a clean project where I have only installed Laravel 8 and Laravel Nova 3.
Thanks a lot