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

54 lines
1.6 KiB
PHP

<?php
uses(RefreshDatabase::class);
test('create 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.mass-pm.create'));
$response->assertOk();
$response->assertViewIs('Staff.masspm.index');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\MassActionController::class,
'store',
\App\Http\Requests\Staff\StoreMassActionRequest::class
);
});
test('store 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)->post(route('staff.mass-pm.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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.');
$users = \App\Models\User::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.mass-actions.validate'));
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...