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

33 lines
1014 B
PHP

<?php
uses(RefreshDatabase::class);
test('destroy 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.');
$audit = \App\Models\Audit::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.audits.destroy', [$audit]));
$response->assertOk();
$this->assertModelMissing($audit);
// TODO: perform additional assertions
});
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('staff.audits.index'));
$response->assertOk();
$response->assertViewIs('Staff.audit.index');
// TODO: perform additional assertions
});
// test cases...