mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-21 04:09:48 -06:00
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
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.');
|
|
|
|
$user = \App\Models\User::factory()->create();
|
|
$torrents = \App\Models\Torrent::factory()->times(3)->create();
|
|
$authUser = \App\Models\User::factory()->create();
|
|
|
|
$response = $this->actingAs($authUser)->get(route('users.torrent_zip.show', [$user]));
|
|
|
|
$response->assertOk();
|
|
|
|
// TODO: perform additional assertions
|
|
});
|
|
|
|
test('show aborts with a 403', 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();
|
|
$torrents = \App\Models\Torrent::factory()->times(3)->create();
|
|
$authUser = \App\Models\User::factory()->create();
|
|
|
|
// TODO: perform additional setup to trigger `abort_unless(403)`...
|
|
|
|
$response = $this->actingAs($authUser)->get(route('users.torrent_zip.show', [$user]));
|
|
|
|
$response->assertForbidden();
|
|
});
|
|
|
|
// test cases...
|