actingAs(User::factory()->superuser()->create()) ->get(route('models.index')) ->assertStatus(200); } public function testUserCanCreateAssetModels() { $this->actingAs(User::factory()->superuser()->create()) ->post(route('models.index'), [ 'name' => 'Test Model', 'category_id' => Category::factory()->create()->id ]) ->assertStatus(302) ->assertRedirect(route('models.index')); } }