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

53 lines
1.7 KiB
PHP

<?php
uses(RefreshDatabase::class);
test('request 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$report = \App\Models\Report::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('report_request', ['id' => $report->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('torrent 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.');
$torrent = \App\Models\Torrent::factory()->create();
$report = \App\Models\Report::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('report_torrent', ['id' => $report->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('user 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.');
$report = \App\Models\Report::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('report_user', ['username' => $report->username]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...