Files
UNIT3D-Community-Edition/tests/Feature/Http/Controllers/MediaHub/PersonControllerTest.php
2023-07-11 18:27:15 +00:00

36 lines
1.2 KiB
PHP

<?php
uses(RefreshDatabase::class);
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.persons.index'));
$response->assertOk();
$response->assertViewIs('mediahub.person.index');
// TODO: perform additional assertions
});
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$person = \App\Models\Person::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.persons.show', ['id' => $person->id]));
$response->assertOk();
$response->assertViewIs('mediahub.person.show');
$response->assertViewHas('person', $person);
$response->assertViewHas('movieCategoryIds');
$response->assertViewHas('tvCategoryIds');
// TODO: perform additional assertions
});
// test cases...