mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-20 20:04:20 -06:00
89 lines
3.5 KiB
PHP
89 lines
3.5 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.');
|
|
|
|
$category = \App\Models\Category::factory()->create();
|
|
$movie = \App\Models\Movie::factory()->create();
|
|
$tv = \App\Models\Tv::factory()->create();
|
|
$user = \App\Models\User::factory()->create();
|
|
|
|
$response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
|
|
|
|
$response->assertOk();
|
|
$response->assertViewIs('torrent.similar');
|
|
$response->assertViewHas('meta');
|
|
$response->assertViewHas('personal_freeleech');
|
|
$response->assertViewHas('trailer');
|
|
$response->assertViewHas('platforms');
|
|
$response->assertViewHas('category', $category);
|
|
$response->assertViewHas('tmdb');
|
|
$response->assertViewHas('igdb');
|
|
|
|
// TODO: perform additional assertions
|
|
});
|
|
|
|
test('show aborts with a 404', function (): void {
|
|
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
|
|
|
$category = \App\Models\Category::factory()->create();
|
|
$movie = \App\Models\Movie::factory()->create();
|
|
$tv = \App\Models\Tv::factory()->create();
|
|
$user = \App\Models\User::factory()->create();
|
|
|
|
// TODO: perform additional setup to trigger `abort_unless(404)`...
|
|
|
|
$response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
|
|
|
|
$response->assertNotFound();
|
|
});
|
|
|
|
test('show aborts with a 404', function (): void {
|
|
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
|
|
|
$category = \App\Models\Category::factory()->create();
|
|
$movie = \App\Models\Movie::factory()->create();
|
|
$tv = \App\Models\Tv::factory()->create();
|
|
$user = \App\Models\User::factory()->create();
|
|
|
|
// TODO: perform additional setup to trigger `abort_unless(404)`...
|
|
|
|
$response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
|
|
|
|
$response->assertNotFound();
|
|
});
|
|
|
|
test('show aborts with a 404', function (): void {
|
|
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
|
|
|
$category = \App\Models\Category::factory()->create();
|
|
$movie = \App\Models\Movie::factory()->create();
|
|
$tv = \App\Models\Tv::factory()->create();
|
|
$user = \App\Models\User::factory()->create();
|
|
|
|
// TODO: perform additional setup to trigger `abort_unless(404)`...
|
|
|
|
$response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
|
|
|
|
$response->assertNotFound();
|
|
});
|
|
|
|
test('show aborts with a 404', function (): void {
|
|
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
|
|
|
$category = \App\Models\Category::factory()->create();
|
|
$movie = \App\Models\Movie::factory()->create();
|
|
$tv = \App\Models\Tv::factory()->create();
|
|
$user = \App\Models\User::factory()->create();
|
|
|
|
// TODO: perform additional setup to trigger `abort(404)`...
|
|
|
|
$response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
|
|
|
|
$response->assertNotFound();
|
|
});
|
|
|
|
// test cases...
|