Generate HTTP tests for controllers

This commit is contained in:
Shift
2023-07-11 18:27:15 +00:00
parent 00f1bd1b68
commit 39e8a86b88
123 changed files with 9019 additions and 0 deletions

View File

@@ -0,0 +1,289 @@
<?php
uses(RefreshDatabase::class);
test('audibles 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get('api/chat/audibles');
$response->assertOk();
// TODO: perform additional assertions
});
test('bot messages 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.');
$bot = \App\Models\Bot::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/bot/{bot_id}');
$response->assertOk();
// TODO: perform additional assertions
});
test('bots 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('api/chat/bots');
$response->assertOk();
// TODO: perform additional assertions
});
test('config 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('api/chat/config');
$response->assertOk();
// TODO: perform additional assertions
});
test('create message 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.');
$bots = \App\Models\Bot::factory()->times(3)->create();
$userEchos = \App\Models\UserEcho::factory()->times(3)->create();
$userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post('api/chat/messages', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('delete bot echo 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();
$userEchos = \App\Models\UserEcho::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/echoes/{user_id}/delete/bot', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('delete message 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('api/chat/message/{id}/delete', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('delete room echo 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();
$userEchos = \App\Models\UserEcho::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/echoes/{user_id}/delete/chatroom', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('delete target echo 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();
$userEchos = \App\Models\UserEcho::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/echoes/{user_id}/delete/target', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('echoes 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get('api/chat/echoes');
$response->assertOk();
// TODO: perform additional assertions
});
test('messages 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('api/chat/messages/{room_id}');
$response->assertOk();
// TODO: perform additional assertions
});
test('private messages 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('api/chat/private/messages/{target_id}');
$response->assertOk();
// TODO: perform additional assertions
});
test('rooms 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('api/chat/rooms');
$response->assertOk();
// TODO: perform additional assertions
});
test('statuses 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('api/chat/statuses');
$response->assertOk();
// TODO: perform additional assertions
});
test('toggle bot audible 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();
$userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/audibles/{user_id}/toggle/bot', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('toggle room audible 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();
$userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/audibles/{user_id}/toggle/chatroom', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('toggle target audible 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();
$userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/audibles/{user_id}/toggle/target', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update user chat status 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/user/{id}/status', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update user room 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();
$userEchos = \App\Models\UserEcho::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/user/{id}/chatroom', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update user target 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/user/{id}/target', [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,66 @@
<?php
uses(RefreshDatabase::class);
test('filter 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.');
$response = $this->getJson('api/torrents/filter');
$response->assertOk();
$response->assertJsonStructure([
// TODO: compare expected response data
]);
// 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$response = $this->getJson(route('api.torrents.index'));
$response->assertOk();
$response->assertJsonStructure([
// TODO: compare expected response data
]);
// TODO: perform additional assertions
});
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.');
$torrent = \App\Models\Torrent::factory()->create();
$response = $this->getJson('api/torrents/{id}');
$response->assertOk();
$response->assertJsonStructure([
// TODO: compare expected response data
]);
// TODO: perform additional assertions
});
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.');
$category = \App\Models\Category::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->postJson('api/torrents/upload', [
// TODO: send request data
]);
$response->assertOk();
$response->assertJsonStructure([
// TODO: compare expected response data
]);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,13 @@
<?php
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.');
$response = $this->get(route('announce', ['passkey' => $passkey]));
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,62 @@
<?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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.approved_fills.destroy', [$torrentRequest]));
$response->assertOk();
$this->assertModelMissing($torrentRequest);
// TODO: perform additional assertions
});
test('destroy 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('requests.approved_fills.destroy', [$torrentRequest]));
$response->assertForbidden();
});
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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.approved_fills.store', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('store 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('requests.approved_fills.store', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,35 @@
<?php
uses(RefreshDatabase::class);
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.');
$articles = \App\Models\Article::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('articles.index'));
$response->assertOk();
$response->assertViewIs('article.index');
$response->assertViewHas('articles', $articles);
// TODO: perform additional assertions
});
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.');
$article = \App\Models\Article::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('articles.show', [$article]));
$response->assertOk();
$response->assertViewIs('article.show');
$response->assertViewHas('article', $article);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,13 @@
<?php
test('activate 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.');
$response = $this->get(route('activate', ['token' => $token]));
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,26 @@
<?php
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.');
$response = $this->get(route('application.create'));
$response->assertOk();
$response->assertViewIs('auth.application.create');
// TODO: perform additional assertions
});
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.');
$response = $this->post(route('application.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,30 @@
<?php
uses(RefreshDatabase::class);
test('send username reminder 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->post(route('username.email'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('show forgot username form 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.');
$response = $this->get(route('username.request'));
$response->assertOk();
$response->assertViewIs('auth.username');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,100 @@
<?php
uses(RefreshDatabase::class);
test('resend 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('resend'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('resend 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.');
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(404)`...
$response = $this->actingAs($user)->post(route('resend'), [
// TODO: send request data
]);
$response->assertNotFound();
});
test('show verification 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('verificationNeeded'));
$response->assertOk();
$response->assertViewIs('auth.twostep-exceeded');
// TODO: perform additional assertions
});
test('show verification 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.');
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(404)`...
$response = $this->actingAs($user)->get(route('verificationNeeded'));
$response->assertNotFound();
});
test('verify 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('verify'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('verify 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.');
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(404)`...
$response = $this->actingAs($user)->post(route('verify'), [
// TODO: send request data
]);
$response->assertNotFound();
});
test('verify 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.');
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort(404)`...
$response = $this->actingAs($user)->post(route('verify'), [
// TODO: send request data
]);
$response->assertNotFound();
});
// test cases...

View File

@@ -0,0 +1,43 @@
<?php
uses(RefreshDatabase::class);
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\BountyController::class,
'store',
\App\Http\Requests\StoreTorrentRequestBountyRequest::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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.bounties.store', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('store 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('requests.bounties.store', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,57 @@
<?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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$torrentRequestClaim = \App\Models\TorrentRequestClaim::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.claims.destroy', [$torrentRequest, 'claim' => $claim]));
$response->assertOk();
$this->assertModelMissing($claim);
// TODO: perform additional assertions
});
test('destroy 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$torrentRequestClaim = \App\Models\TorrentRequestClaim::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('requests.claims.destroy', [$torrentRequest, 'claim' => $claim]));
$response->assertForbidden();
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\ClaimController::class,
'store',
\App\Http\Requests\StoreTorrentRequestClaimRequest::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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.claims.store', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,33 @@
<?php
uses(RefreshDatabase::class);
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('contact.index'));
$response->assertOk();
$response->assertViewIs('contact.index');
// TODO: perform additional assertions
});
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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post(route('contact.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,20 @@
<?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.');
$forum = \App\Models\Forum::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('forums.categories.show', ['id' => $id]));
$response->assertOk();
$response->assertViewIs('forum.category_topic.index');
$response->assertViewHas('forum', $forum);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,38 @@
<?php
uses(RefreshDatabase::class);
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.');
$forums = \App\Models\Forum::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('forums.index'));
$response->assertOk();
$response->assertViewIs('forum.index');
$response->assertViewHas('categories');
$response->assertViewHas('num_posts');
$response->assertViewHas('num_forums');
$response->assertViewHas('num_topics');
// TODO: perform additional assertions
});
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.');
$forum = \App\Models\Forum::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('forums.show', ['id' => $forum->id]));
$response->assertOk();
$response->assertViewIs('forum.forum_topic.index');
$response->assertViewHas('forum', $forum);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,48 @@
<?php
uses(RefreshDatabase::class);
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.');
$poll = \App\Models\Poll::factory()->create();
$articles = \App\Models\Article::factory()->times(3)->create();
$users = \App\Models\User::factory()->times(3)->create();
$groups = \App\Models\Group::factory()->times(3)->create();
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$movies = \App\Models\Movie::factory()->times(3)->create();
$tvs = \App\Models\Tv::factory()->times(3)->create();
$topics = \App\Models\Topic::factory()->times(3)->create();
$posts = \App\Models\Post::factory()->times(3)->create();
$featuredTorrents = \App\Models\FeaturedTorrent::factory()->times(3)->create();
$freeleechTokens = \App\Models\FreeleechToken::factory()->times(3)->create();
$bookmarks = \App\Models\Bookmark::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('home.index'));
$response->assertOk();
$response->assertViewIs('home.index');
$response->assertViewHas('user', $user);
$response->assertViewHas('personal_freeleech');
$response->assertViewHas('users', $users);
$response->assertViewHas('groups', $groups);
$response->assertViewHas('articles', $articles);
$response->assertViewHas('newest');
$response->assertViewHas('seeded');
$response->assertViewHas('dying');
$response->assertViewHas('leeched');
$response->assertViewHas('dead');
$response->assertViewHas('topics', $topics);
$response->assertViewHas('posts', $posts);
$response->assertViewHas('featured');
$response->assertViewHas('poll', $poll);
$response->assertViewHas('uploaders');
$response->assertViewHas('past_uploaders');
$response->assertViewHas('freeleech_tokens');
$response->assertViewHas('bookmarks', $bookmarks);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,33 @@
<?php
uses(RefreshDatabase::class);
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('mediahub.collections.index'));
$response->assertOk();
$response->assertViewIs('mediahub.collection.index');
// TODO: perform additional assertions
});
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.');
$collection = \App\Models\Collection::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.collections.show', ['id' => $collection->id]));
$response->assertOk();
$response->assertViewIs('mediahub.collection.show');
$response->assertViewHas('collection', $collection);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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('mediahub.companies.index'));
$response->assertOk();
$response->assertViewIs('mediahub.company.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,20 @@
<?php
uses(RefreshDatabase::class);
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.');
$genres = \App\Models\Genre::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.genres.index'));
$response->assertOk();
$response->assertViewIs('mediahub.genre.index');
$response->assertViewHas('genres', $genres);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,26 @@
<?php
uses(RefreshDatabase::class);
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('mediahub.index'));
$response->assertOk();
$response->assertViewIs('mediahub.index');
$response->assertViewHas('tv');
$response->assertViewHas('movies');
$response->assertViewHas('movieCategoryIds');
$response->assertViewHas('collections');
$response->assertViewHas('persons');
$response->assertViewHas('genres');
$response->assertViewHas('networks');
$response->assertViewHas('companies');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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('mediahub.networks.index'));
$response->assertOk();
$response->assertViewIs('mediahub.network.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,35 @@
<?php
uses(RefreshDatabase::class);
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('mediahub.persons.index'));
$response->assertOk();
$response->assertViewIs('mediahub.person.index');
// TODO: perform additional assertions
});
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.');
$person = \App\Models\Person::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.persons.show', ['id' => $person->id]));
$response->assertOk();
$response->assertViewIs('mediahub.person.show');
$response->assertViewHas('person', $person);
$response->assertViewHas('movieCategoryIds');
$response->assertViewHas('tvCategoryIds');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,22 @@
<?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.');
$season = \App\Models\Season::factory()->create();
$tv = \App\Models\Tv::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.season.show', ['id' => $id]));
$response->assertOk();
$response->assertViewIs('mediahub.tv.season.show');
$response->assertViewHas('season', $season);
$response->assertViewHas('show');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,33 @@
<?php
uses(RefreshDatabase::class);
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('mediahub.shows.index'));
$response->assertOk();
$response->assertViewIs('mediahub.tv.index');
// TODO: perform additional assertions
});
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.');
$tv = \App\Models\Tv::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.shows.show', ['id' => $id]));
$response->assertOk();
$response->assertViewIs('mediahub.tv.show');
$response->assertViewHas('show');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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('missing.index'));
$response->assertOk();
$response->assertViewIs('missing.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,93 @@
<?php
uses(RefreshDatabase::class);
test('about 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('about'));
$response->assertOk();
$response->assertViewIs('page.aboutus');
// TODO: perform additional assertions
});
test('clientblacklist 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.');
$blacklistClients = \App\Models\BlacklistClient::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('client_blacklist'));
$response->assertOk();
$response->assertViewIs('page.blacklist.client');
$response->assertViewHas('clients');
// 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.');
$pages = \App\Models\Page::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('pages.index'));
$response->assertOk();
$response->assertViewIs('page.index');
$response->assertViewHas('pages', $pages);
// TODO: perform additional assertions
});
test('internal 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.');
$internals = \App\Models\Internal::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('internal'));
$response->assertOk();
$response->assertViewIs('page.internal');
$response->assertViewHas('internals', $internals);
// TODO: perform additional assertions
});
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.');
$page = \App\Models\Page::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('pages.show', [$page]));
$response->assertOk();
$response->assertViewIs('page.page');
$response->assertViewHas('page', $page);
// TODO: perform additional assertions
});
test('staff 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.');
$groups = \App\Models\Group::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff'));
$response->assertOk();
$response->assertViewIs('page.staff');
$response->assertViewHas('staff');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,182 @@
<?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('playlists.create'));
$response->assertOk();
$response->assertViewIs('playlist.create');
// TODO: perform additional assertions
});
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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('playlists.destroy', [$playlist]));
$response->assertOk();
$this->assertModelMissing($playlist);
// TODO: perform additional assertions
});
test('destroy 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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('playlists.destroy', [$playlist]));
$response->assertForbidden();
});
test('edit 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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('playlists.edit', [$playlist]));
$response->assertOk();
$response->assertViewIs('playlist.edit');
$response->assertViewHas('playlist', $playlist);
// TODO: perform additional assertions
});
test('edit 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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->get(route('playlists.edit', [$playlist]));
$response->assertForbidden();
});
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.');
$playlists = \App\Models\Playlist::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('playlists.index'));
$response->assertOk();
$response->assertViewIs('playlist.index');
$response->assertViewHas('playlists', $playlists);
// TODO: perform additional assertions
});
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.');
$playlist = \App\Models\Playlist::factory()->create();
$tv = \App\Models\Tv::factory()->create();
$movie = \App\Models\Movie::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('playlists.show', [$playlist]));
$response->assertOk();
$response->assertViewIs('playlist.show');
$response->assertViewHas('playlist', $playlist);
$response->assertViewHas('meta');
$response->assertViewHas('torrents');
// 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.');
$playlist = \App\Models\Playlist::factory()->create();
$tv = \App\Models\Tv::factory()->create();
$movie = \App\Models\Movie::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($user)->get(route('playlists.show', [$playlist]));
$response->assertForbidden();
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\PlaylistController::class,
'store',
\App\Http\Requests\StorePlaylistRequest::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('playlists.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\PlaylistController::class,
'update',
\App\Http\Requests\UpdatePlaylistRequest::class
);
});
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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('playlists.update', [$playlist]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->patch(route('playlists.update', [$playlist]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,108 @@
<?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.');
$playlistTorrent = \App\Models\PlaylistTorrent::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('playlist_torrents.destroy', [$playlistTorrent]));
$response->assertOk();
$this->assertModelMissing($playlistTorrent);
// TODO: perform additional assertions
});
test('destroy 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.');
$playlistTorrent = \App\Models\PlaylistTorrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('playlist_torrents.destroy', [$playlistTorrent]));
$response->assertForbidden();
});
test('massupsert validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\PlaylistTorrentController::class,
'massUpsert',
\App\Http\Requests\MassUpsertPlaylistTorrentRequest::class
);
});
test('mass upsert 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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->put(route('playlist_torrents.massUpsert'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('mass upsert 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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->put(route('playlist_torrents.massUpsert'), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\PlaylistTorrentController::class,
'store',
\App\Http\Requests\StorePlaylistTorrentRequest::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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('playlist_torrents.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('store 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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('playlist_torrents.store'), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?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.');
$playlist = \App\Models\Playlist::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('playlist_zips.show', [$playlist]));
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,35 @@
<?php
uses(RefreshDatabase::class);
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.');
$polls = \App\Models\Poll::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('polls.index'));
$response->assertOk();
$response->assertViewIs('poll.latest');
$response->assertViewHas('polls', $polls);
// TODO: perform additional assertions
});
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.');
$poll = \App\Models\Poll::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('polls.show', [$poll]));
$response->assertOk();
$response->assertViewIs('poll.show');
$response->assertViewHas('poll', $poll);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,44 @@
<?php
uses(RefreshDatabase::class);
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.');
$poll = \App\Models\Poll::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('polls.votes.index', [$poll]));
$response->assertOk();
$response->assertViewIs('poll.result');
$response->assertViewHas('poll', $poll);
$response->assertViewHas('total_votes');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\PollVoteController::class,
'store',
\App\Http\Requests\StorePollVoteRequest::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.');
$poll = \App\Models\Poll::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('polls.votes.store', [$poll]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,137 @@
<?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.');
$post = \App\Models\Post::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('posts.destroy', ['id' => $post->id]));
$response->assertOk();
$this->assertModelMissing($post);
// TODO: perform additional assertions
});
test('destroy 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.');
$post = \App\Models\Post::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('posts.destroy', ['id' => $post->id]));
$response->assertForbidden();
});
test('edit 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.');
$post = \App\Models\Post::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('posts.edit', ['id' => $post->id]));
$response->assertOk();
$response->assertViewIs('forum.post.edit');
$response->assertViewHas('topic');
$response->assertViewHas('forum');
$response->assertViewHas('post', $post);
$response->assertViewHas('category');
// TODO: perform additional assertions
});
test('edit 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.');
$post = \App\Models\Post::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->get(route('posts.edit', ['id' => $post->id]));
$response->assertForbidden();
});
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('posts.index'));
$response->assertOk();
$response->assertViewIs('forum.post.index');
// TODO: perform additional assertions
});
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.');
$topic = \App\Models\Topic::factory()->create();
$users = \App\Models\User::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('posts.store'), [
// TODO: send request data
]);
$response->assertRedirect(withSuccess(trans('forum.reply-topic-success')));
// 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.');
$post = \App\Models\Post::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('posts.update', ['id' => $post->id]), [
// TODO: send request data
]);
$response->assertRedirect(withSuccess(trans('forum.edit-post-success')));
// TODO: perform additional assertions
});
test('update 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.');
$post = \App\Models\Post::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->patch(route('posts.update', ['id' => $post->id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('update 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.');
$post = \App\Models\Post::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->patch(route('posts.update', ['id' => $post->id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,52 @@
<?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...

View File

@@ -0,0 +1,174 @@
<?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.');
$category = \App\Models\Category::factory()->create();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('requests.create'));
$response->assertOk();
$response->assertViewIs('requests.create');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('user', $user);
$response->assertViewHas('category_id');
$response->assertViewHas('title');
$response->assertViewHas('imdb');
$response->assertViewHas('tmdb');
$response->assertViewHas('mal');
$response->assertViewHas('tvdb');
$response->assertViewHas('igdb');
// TODO: perform additional assertions
});
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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.destroy', [$torrentRequest]));
$response->assertOk();
$this->assertModelMissing($torrentRequest);
// TODO: perform additional assertions
});
test('destroy 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('requests.destroy', [$torrentRequest]));
$response->assertForbidden();
});
test('edit 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();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('requests.edit', [$torrentRequest]));
$response->assertOk();
$response->assertViewIs('requests.edit');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('user', $user);
$response->assertViewHas('torrentRequest', $torrentRequest);
// 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('requests.index'));
$response->assertOk();
$response->assertViewIs('requests.index');
// TODO: perform additional assertions
});
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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$tv = \App\Models\Tv::factory()->create();
$movie = \App\Models\Movie::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('requests.show', [$torrentRequest]));
$response->assertOk();
$response->assertViewIs('requests.show');
$response->assertViewHas('torrentRequest', $torrentRequest);
$response->assertViewHas('user', $user);
$response->assertViewHas('meta');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\RequestController::class,
'store',
\App\Http\Requests\StoreTorrentRequestRequest::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('requests.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\RequestController::class,
'update',
\App\Http\Requests\UpdateTorrentRequestRequest::class
);
});
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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('requests.update', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->patch(route('requests.update', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,56 @@
<?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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.fills.destroy', [$torrentRequest]));
$response->assertOk();
$this->assertModelMissing($torrentRequest);
// TODO: perform additional assertions
});
test('destroy 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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('requests.fills.destroy', [$torrentRequest]));
$response->assertForbidden();
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\RequestFillController::class,
'store',
\App\Http\Requests\StoreRequestFillRequest::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.');
$torrentRequest = \App\Models\TorrentRequest::factory()->create();
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.fills.store', [$torrentRequest]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,22 @@
<?php
uses(RefreshDatabase::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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
$histories = \App\Models\History::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post(route('reseed', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,155 @@
<?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.');
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$genres = \App\Models\Genre::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('rss.create'));
$response->assertOk();
$response->assertViewIs('rss.create');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('genres', $genres);
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
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.');
$rss = \App\Models\Rss::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('rss.destroy', ['id' => $rss->id]));
$response->assertOk();
$this->assertModelMissing($rss);
// TODO: perform additional assertions
});
test('edit 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.');
$rss = \App\Models\Rss::factory()->create();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$genres = \App\Models\Genre::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('rss.edit', ['id' => $rss->id]));
$response->assertOk();
$response->assertViewIs('rss.edit');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('genres', $genres);
$response->assertViewHas('user', $user);
$response->assertViewHas('rss', $rss);
// TODO: perform additional assertions
});
test('edit 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.');
$rss = \App\Models\Rss::factory()->create();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$genres = \App\Models\Genre::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->get(route('rss.edit', ['id' => $rss->id]));
$response->assertForbidden();
});
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.');
$rsses = \App\Models\Rss::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('rss.index'));
$response->assertOk();
$response->assertViewIs('rss.index');
$response->assertViewHas('hash');
$response->assertViewHas('public_rss');
$response->assertViewHas('private_rss');
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
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.');
$rss = \App\Models\Rss::factory()->create();
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$response = $this->get(route('rss.show.rsskey', ['id' => $rss->id, 'rsskey' => $rss->rsskey]));
$response->assertOk();
// 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.');
$rss = \App\Models\Rss::factory()->create();
$torrents = \App\Models\Torrent::factory()->times(3)->create();
// TODO: perform additional setup to trigger `abort_if(404)`...
$response = $this->get(route('rss.show.rsskey', ['id' => $rss->id, 'rsskey' => $rss->rsskey]));
$response->assertNotFound();
});
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('rss.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.');
$rss = \App\Models\Rss::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('rss.update', ['id' => $rss->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,88 @@
<?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...

View File

@@ -0,0 +1,81 @@
<?php
uses(RefreshDatabase::class);
test('approve validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ApplicationController::class,
'approve',
\App\Http\Requests\Staff\ApproveApplicationRequest::class
);
});
test('approve 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.');
$application = \App\Models\Application::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.applications.approve', ['id' => $application->id]), [
// TODO: send request data
]);
$response->assertOk();
// 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.');
$applications = \App\Models\Application::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.applications.index'));
$response->assertOk();
$response->assertViewIs('Staff.application.index');
$response->assertViewHas('applications', $applications);
// TODO: perform additional assertions
});
test('reject validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ApplicationController::class,
'reject',
\App\Http\Requests\Staff\RejectApplicationRequest::class
);
});
test('reject 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.');
$application = \App\Models\Application::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.applications.reject', ['id' => $application->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
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.');
$application = \App\Models\Application::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.applications.show', ['id' => $application->id]));
$response->assertOk();
$response->assertViewIs('Staff.application.show');
$response->assertViewHas('application', $application);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.articles.create'));
$response->assertOk();
$response->assertViewIs('Staff.article.create');
// TODO: perform additional assertions
});
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.');
$article = \App\Models\Article::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.articles.destroy', [$article]));
$response->assertOk();
$this->assertModelMissing($article);
// TODO: perform additional assertions
});
test('edit 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.');
$article = \App\Models\Article::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.articles.edit', [$article]));
$response->assertOk();
$response->assertViewIs('Staff.article.edit');
$response->assertViewHas('article', $article);
// 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.');
$articles = \App\Models\Article::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.articles.index'));
$response->assertOk();
$response->assertViewIs('Staff.article.index');
$response->assertViewHas('articles', $articles);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ArticleController::class,
'store',
\App\Http\Requests\Staff\StoreArticleRequest::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.articles.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ArticleController::class,
'update',
\App\Http\Requests\Staff\UpdateArticleRequest::class
);
});
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.');
$article = \App\Models\Article::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.articles.update', [$article]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,32 @@
<?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...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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.authentications.index'));
$response->assertOk();
$response->assertViewIs('Staff.authentication.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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.backups.index'));
$response->assertOk();
$response->assertViewIs('Staff.backup.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,58 @@
<?php
uses(RefreshDatabase::class);
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.');
$bans = \App\Models\Ban::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bans.index'));
$response->assertOk();
$response->assertViewIs('Staff.ban.index');
$response->assertViewHas('bans', $bans);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\BanController::class,
'store',
\App\Http\Requests\Staff\StoreBanRequest::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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post(route('staff.bans.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('store 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($authUser)->post(route('staff.bans.store'), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.blacklisted_clients.create'));
$response->assertOk();
$response->assertViewIs('Staff.blacklist.clients.create');
// TODO: perform additional assertions
});
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.');
$blacklistClient = \App\Models\BlacklistClient::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.blacklisted_clients.destroy', [$blacklistClient]));
$response->assertOk();
$this->assertModelMissing($blacklistClient);
// TODO: perform additional assertions
});
test('edit 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.');
$blacklistClient = \App\Models\BlacklistClient::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.blacklisted_clients.edit', [$blacklistClient]));
$response->assertOk();
$response->assertViewIs('Staff.blacklist.clients.edit');
$response->assertViewHas('client');
// 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.');
$blacklistClients = \App\Models\BlacklistClient::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.blacklisted_clients.index'));
$response->assertOk();
$response->assertViewIs('Staff.blacklist.clients.index');
$response->assertViewHas('clients');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\BlacklistClientController::class,
'store',
\App\Http\Requests\Staff\StoreBlacklistClientRequest::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.blacklisted_clients.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\BlacklistClientController::class,
'update',
\App\Http\Requests\Staff\UpdateBlacklistClientRequest::class
);
});
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.');
$blacklistClient = \App\Models\BlacklistClient::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.blacklisted_clients.update', [$blacklistClient]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.bon_exchanges.create'));
$response->assertOk();
$response->assertViewIs('Staff.bon_exchange.create');
// TODO: perform additional assertions
});
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.');
$bonExchange = \App\Models\BonExchange::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.bon_exchanges.destroy', [$bonExchange]));
$response->assertOk();
$this->assertModelMissing($bonExchange);
// TODO: perform additional assertions
});
test('edit 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.');
$bonExchange = \App\Models\BonExchange::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bon_exchanges.edit', [$bonExchange]));
$response->assertOk();
$response->assertViewIs('Staff.bon_exchange.edit');
$response->assertViewHas('bonExchange', $bonExchange);
// 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.');
$bonExchanges = \App\Models\BonExchange::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bon_exchanges.index'));
$response->assertOk();
$response->assertViewIs('Staff.bon_exchange.index');
$response->assertViewHas('bonExchanges', $bonExchanges);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\BonExchangeController::class,
'store',
\App\Http\Requests\Staff\StoreBonExchangeRequest::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.bon_exchanges.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\BonExchangeController::class,
'update',
\App\Http\Requests\Staff\UpdateBonExchangeRequest::class
);
});
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.');
$bonExchange = \App\Models\BonExchange::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.bon_exchanges.update', [$bonExchange]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.categories.create'));
$response->assertOk();
$response->assertViewIs('Staff.category.create');
// TODO: perform additional assertions
});
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.');
$category = \App\Models\Category::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.categories.destroy', [$category]));
$response->assertOk();
$this->assertModelMissing($category);
// TODO: perform additional assertions
});
test('edit 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.categories.edit', [$category]));
$response->assertOk();
$response->assertViewIs('Staff.category.edit');
$response->assertViewHas('category', $category);
// 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.');
$categories = \App\Models\Category::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.categories.index'));
$response->assertOk();
$response->assertViewIs('Staff.category.index');
$response->assertViewHas('categories', $categories);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\CategoryController::class,
'store',
\App\Http\Requests\Staff\StoreCategoryRequest::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.categories.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\CategoryController::class,
'update',
\App\Http\Requests\Staff\UpdateCategoryRequest::class
);
});
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.');
$category = \App\Models\Category::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.categories.update', [$category]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,116 @@
<?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.');
$bot = \App\Models\Bot::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.bots.destroy', [$bot]));
$response->assertOk();
$this->assertModelMissing($bot);
// TODO: perform additional assertions
});
test('destroy 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.');
$bot = \App\Models\Bot::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($user)->delete(route('staff.bots.destroy', [$bot]));
$response->assertForbidden();
});
test('disable 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.');
$bot = \App\Models\Bot::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.bots.disable', [$bot]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('edit 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.');
$bot = \App\Models\Bot::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bots.edit', [$bot]));
$response->assertOk();
$response->assertViewIs('Staff.chat.bot.edit');
$response->assertViewHas('user', $user);
$response->assertViewHas('bot', $bot);
// TODO: perform additional assertions
});
test('enable 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.');
$bot = \App\Models\Bot::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.bots.enable', [$bot]), [
// TODO: send request data
]);
$response->assertOk();
// 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.');
$bots = \App\Models\Bot::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bots.index'));
$response->assertOk();
$response->assertViewIs('Staff.chat.bot.index');
$response->assertViewHas('bots', $bots);
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ChatBotController::class,
'update',
\App\Http\Requests\Staff\UpdateChatBotRequest::class
);
});
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.');
$bot = \App\Models\Bot::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.bots.update', [$bot]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,106 @@
<?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.chatrooms.create'));
$response->assertOk();
$response->assertViewIs('Staff.chat.room.create');
// TODO: perform additional assertions
});
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.');
$chatroom = \App\Models\Chatroom::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.chatrooms.destroy', [$chatroom]));
$response->assertOk();
$this->assertModelMissing($chatroom);
// TODO: perform additional assertions
});
test('edit 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.');
$chatroom = \App\Models\Chatroom::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.chatrooms.edit', [$chatroom]));
$response->assertOk();
$response->assertViewIs('Staff.chat.room.edit');
$response->assertViewHas('chatroom', $chatroom);
// 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.chatrooms.index'));
$response->assertOk();
$response->assertViewIs('Staff.chat.room.index');
$response->assertViewHas('chatrooms');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ChatRoomController::class,
'store',
\App\Http\Requests\Staff\StoreChatRoomRequest::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.chatrooms.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ChatRoomController::class,
'update',
\App\Http\Requests\Staff\UpdateChatRoomRequest::class
);
});
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.');
$chatroom = \App\Models\Chatroom::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.chatrooms.update', [$chatroom]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.statuses.create'));
$response->assertOk();
$response->assertViewIs('Staff.chat.status.create');
// TODO: perform additional assertions
});
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.');
$chatStatus = \App\Models\ChatStatus::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.statuses.destroy', [$chatStatus]));
$response->assertOk();
$this->assertModelMissing($chatStatus);
// TODO: perform additional assertions
});
test('edit 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.');
$chatStatus = \App\Models\ChatStatus::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.statuses.edit', [$chatStatus]));
$response->assertOk();
$response->assertViewIs('Staff.chat.status.edit');
$response->assertViewHas('chatstatus');
// 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.');
$chatStatuses = \App\Models\ChatStatus::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.statuses.index'));
$response->assertOk();
$response->assertViewIs('Staff.chat.status.index');
$response->assertViewHas('chatstatuses');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ChatStatusController::class,
'store',
\App\Http\Requests\Staff\StoreChatStatusRequest::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.statuses.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ChatStatusController::class,
'update',
\App\Http\Requests\Staff\UpdateChatStatusRequest::class
);
});
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.');
$chatStatus = \App\Models\ChatStatus::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.statuses.update', [$chatStatus]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,46 @@
<?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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.cheated_torrents.destroy', ['cheatedTorrent' => $cheatedTorrent]));
$response->assertOk();
$this->assertModelMissing($cheatedTorrent);
// 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.cheated_torrents.index'));
$response->assertOk();
$response->assertViewIs('Staff.cheated_torrent.index');
$response->assertViewHas('torrents', $torrents);
// TODO: perform additional assertions
});
test('mass 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.');
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.cheated_torrents.massDestroy'));
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,20 @@
<?php
uses(RefreshDatabase::class);
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.');
$users = \App\Models\User::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.cheaters.index'));
$response->assertOk();
$response->assertViewIs('Staff.cheater.index');
$response->assertViewHas('cheaters');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,144 @@
<?php
uses(RefreshDatabase::class);
test('clear all cache 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('clear cache 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('clear config 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('clear route 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('clear view 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.'), [
// TODO: send request data
]);
$response->assertOk();
// 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.commands.index'));
$response->assertOk();
$response->assertViewIs('Staff.command.index');
// TODO: perform additional assertions
});
test('maintance disable 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('maintance enable 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('set all cache 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('test email 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.'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,132 @@
<?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.distributors.create'));
$response->assertOk();
$response->assertViewIs('Staff.distributor.create');
// TODO: perform additional assertions
});
test('delete 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.');
$distributor = \App\Models\Distributor::factory()->create();
$distributors = \App\Models\Distributor::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.distributors.delete', [$distributor]));
$response->assertOk();
$response->assertViewIs('Staff.distributor.delete');
$response->assertViewHas('distributors', $distributors);
$response->assertViewHas('distributor', $distributor);
// TODO: perform additional assertions
});
test('destroy validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\DistributorController::class,
'destroy',
\App\Http\Requests\Staff\DestroyDistributorRequest::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.');
$distributor = \App\Models\Distributor::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.distributors.destroy', [$distributor]));
$response->assertOk();
$this->assertModelMissing($distributor);
// TODO: perform additional assertions
});
test('edit 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.');
$distributor = \App\Models\Distributor::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.distributors.edit', [$distributor]));
$response->assertOk();
$response->assertViewIs('Staff.distributor.edit');
$response->assertViewHas('distributor', $distributor);
// 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.');
$distributors = \App\Models\Distributor::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.distributors.index'));
$response->assertOk();
$response->assertViewIs('Staff.distributor.index');
$response->assertViewHas('distributors', $distributors);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\DistributorController::class,
'store',
\App\Http\Requests\Staff\StoreDistributorRequest::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.distributors.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\DistributorController::class,
'update',
\App\Http\Requests\Staff\UpdateDistributorRequest::class
);
});
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.');
$distributor = \App\Models\Distributor::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.distributors.update', [$distributor]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,36 @@
<?php
uses(RefreshDatabase::class);
test('chat 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.');
$messages = \App\Models\Message::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.flush.chat'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('peers 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.');
$history = \App\Models\History::factory()->create();
$peers = \App\Models\Peer::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.flush.peers'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,118 @@
<?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.');
$forums = \App\Models\Forum::factory()->times(3)->create();
$groups = \App\Models\Group::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.forums.create'));
$response->assertOk();
$response->assertViewIs('Staff.forum.create');
$response->assertViewHas('categories');
$response->assertViewHas('groups', $groups);
// TODO: perform additional assertions
});
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.');
$forum = \App\Models\Forum::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.forums.destroy', [$forum]));
$response->assertOk();
$this->assertModelMissing($forum);
// TODO: perform additional assertions
});
test('edit 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.');
$forum = \App\Models\Forum::factory()->create();
$forums = \App\Models\Forum::factory()->times(3)->create();
$groups = \App\Models\Group::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.forums.edit', [$forum]));
$response->assertOk();
$response->assertViewIs('Staff.forum.edit');
$response->assertViewHas('categories');
$response->assertViewHas('groups', $groups);
$response->assertViewHas('forum', $forum);
// 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.');
$forums = \App\Models\Forum::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.forums.index'));
$response->assertOk();
$response->assertViewIs('Staff.forum.index');
$response->assertViewHas('categories');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ForumController::class,
'store',
\App\Http\Requests\Staff\StoreForumRequest::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.');
$permission = \App\Models\Permission::factory()->create();
$groups = \App\Models\Group::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.forums.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ForumController::class,
'update',
\App\Http\Requests\Staff\UpdateForumRequest::class
);
});
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.');
$forum = \App\Models\Forum::factory()->create();
$groups = \App\Models\Group::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.forums.update', [$forum]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,94 @@
<?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.groups.create'));
$response->assertOk();
$response->assertViewIs('Staff.group.create');
// TODO: perform additional assertions
});
test('edit 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.');
$group = \App\Models\Group::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.groups.edit', [$group]));
$response->assertOk();
$response->assertViewIs('Staff.group.edit');
$response->assertViewHas('group', $group);
// 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.');
$groups = \App\Models\Group::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.groups.index'));
$response->assertOk();
$response->assertViewIs('Staff.group.index');
$response->assertViewHas('groups', $groups);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\GroupController::class,
'store',
\App\Http\Requests\Staff\StoreGroupRequest::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.groups.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\GroupController::class,
'update',
\App\Http\Requests\Staff\UpdateGroupRequest::class
);
});
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.');
$group = \App\Models\Group::factory()->create();
$users = \App\Models\User::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.groups.update', [$group]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,30 @@
<?php
uses(RefreshDatabase::class);
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.dashboard.index'));
$response->assertOk();
$response->assertViewIs('Staff.dashboard.index');
$response->assertViewHas('users');
$response->assertViewHas('torrents');
$response->assertViewHas('peers');
$response->assertViewHas('reports');
$response->assertViewHas('apps');
$response->assertViewHas('certificate');
$response->assertViewHas('uptime');
$response->assertViewHas('ram');
$response->assertViewHas('disk');
$response->assertViewHas('avg');
$response->assertViewHas('basic');
$response->assertViewHas('file_permissions');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.internals.create'));
$response->assertOk();
$response->assertViewIs('Staff.internals.create');
// TODO: perform additional assertions
});
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.');
$internal = \App\Models\Internal::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.internals.destroy', [$internal]));
$response->assertOk();
$this->assertModelMissing($internal);
// TODO: perform additional assertions
});
test('edit 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.');
$internal = \App\Models\Internal::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.internals.edit', [$internal]));
$response->assertOk();
$response->assertViewIs('Staff.internals.edit');
$response->assertViewHas('internal', $internal);
// 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.');
$internals = \App\Models\Internal::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.internals.index'));
$response->assertOk();
$response->assertViewIs('Staff.internals.index');
$response->assertViewHas('internals', $internals);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\InternalController::class,
'store',
\App\Http\Requests\Staff\StoreInternalRequest::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.internals.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\InternalController::class,
'update',
\App\Http\Requests\Staff\UpdateInternalRequest::class
);
});
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.');
$internal = \App\Models\Internal::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.internals.update', [$internal]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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.invites.index'));
$response->assertOk();
$response->assertViewIs('Staff.invite.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,53 @@
<?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...

View File

@@ -0,0 +1,107 @@
<?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.media_languages.create'));
$response->assertOk();
$response->assertViewIs('Staff.media_language.create');
// TODO: perform additional assertions
});
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.');
$mediaLanguage = \App\Models\MediaLanguage::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.media_languages.destroy', [$mediaLanguage]));
$response->assertOk();
$this->assertModelMissing($mediaLanguage);
// TODO: perform additional assertions
});
test('edit 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.');
$mediaLanguage = \App\Models\MediaLanguage::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.media_languages.edit', [$mediaLanguage]));
$response->assertOk();
$response->assertViewIs('Staff.media_language.edit');
$response->assertViewHas('media_language');
// 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.');
$mediaLanguages = \App\Models\MediaLanguage::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.media_languages.index'));
$response->assertOk();
$response->assertViewIs('Staff.media_language.index');
$response->assertViewHas('media_languages');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\MediaLanguageController::class,
'store',
\App\Http\Requests\Staff\StoreMediaLanguageRequest::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.media_languages.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\MediaLanguageController::class,
'update',
\App\Http\Requests\Staff\UpdateMediaLanguageRequest::class
);
});
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.');
$mediaLanguage = \App\Models\MediaLanguage::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.media_languages.update', [$mediaLanguage]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,46 @@
<?php
uses(RefreshDatabase::class);
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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.moderation.index'));
$response->assertOk();
$response->assertViewIs('Staff.moderation.index');
$response->assertViewHas('current');
$response->assertViewHas('pending');
$response->assertViewHas('postponed');
$response->assertViewHas('rejected');
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ModerationController::class,
'update',
\App\Http\Requests\Staff\UpdateModerationRequest::class
);
});
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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.moderation.update', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,32 @@
<?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.');
$note = \App\Models\Note::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.notes.destroy', [$note]));
$response->assertOk();
$this->assertModelMissing($note);
// 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.notes.index'));
$response->assertOk();
$response->assertViewIs('Staff.note.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.pages.create'));
$response->assertOk();
$response->assertViewIs('Staff.page.create');
// TODO: perform additional assertions
});
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.');
$page = \App\Models\Page::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.pages.destroy', [$page]));
$response->assertOk();
$this->assertModelMissing($page);
// TODO: perform additional assertions
});
test('edit 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.');
$page = \App\Models\Page::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.pages.edit', [$page]));
$response->assertOk();
$response->assertViewIs('Staff.page.edit');
$response->assertViewHas('page', $page);
// 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.');
$pages = \App\Models\Page::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.pages.index'));
$response->assertOk();
$response->assertViewIs('Staff.page.index');
$response->assertViewHas('pages', $pages);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\PageController::class,
'store',
\App\Http\Requests\Staff\StorePageRequest::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.pages.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\PageController::class,
'update',
\App\Http\Requests\Staff\UpdatePageRequest::class
);
});
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.');
$page = \App\Models\Page::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.pages.update', [$page]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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.peers.index'));
$response->assertOk();
$response->assertViewIs('Staff.peer.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,122 @@
<?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.polls.create'));
$response->assertOk();
$response->assertViewIs('Staff.poll.create');
// TODO: perform additional assertions
});
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.');
$poll = \App\Models\Poll::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.polls.destroy', [$poll]));
$response->assertOk();
$this->assertModelMissing($poll);
// TODO: perform additional assertions
});
test('edit 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.');
$poll = \App\Models\Poll::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.polls.edit', [$poll]));
$response->assertOk();
$response->assertViewIs('Staff.poll.edit');
$response->assertViewHas('poll', $poll);
// 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.');
$polls = \App\Models\Poll::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.polls.index'));
$response->assertOk();
$response->assertViewIs('Staff.poll.index');
$response->assertViewHas('polls', $polls);
// TODO: perform additional assertions
});
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.');
$poll = \App\Models\Poll::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.polls.show', [$poll]));
$response->assertOk();
$response->assertViewIs('Staff.poll.show');
$response->assertViewHas('poll', $poll);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\PollController::class,
'store',
\App\Http\Requests\StorePoll::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.polls.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\PollController::class,
'update',
\App\Http\Requests\UpdatePollRequest::class
);
});
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.');
$poll = \App\Models\Poll::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.polls.update', [$poll]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,115 @@
<?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.regions.create'));
$response->assertOk();
$response->assertViewIs('Staff.region.create');
// TODO: perform additional assertions
});
test('destroy validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\RegionController::class,
'destroy',
\App\Http\Requests\Staff\DestroyRegionRequest::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.');
$region = \App\Models\Region::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.regions.destroy', [$region]));
$response->assertOk();
$this->assertModelMissing($region);
// TODO: perform additional assertions
});
test('edit 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.');
$region = \App\Models\Region::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.regions.edit', [$region]));
$response->assertOk();
$response->assertViewIs('Staff.region.edit');
$response->assertViewHas('region', $region);
// 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.');
$regions = \App\Models\Region::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.regions.index'));
$response->assertOk();
$response->assertViewIs('Staff.region.index');
$response->assertViewHas('regions', $regions);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\RegionController::class,
'store',
\App\Http\Requests\Staff\StoreRegionRequest::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.regions.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\RegionController::class,
'update',
\App\Http\Requests\Staff\UpdateRegionRequest::class
);
});
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.');
$region = \App\Models\Region::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.regions.update', [$region]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,59 @@
<?php
uses(RefreshDatabase::class);
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.');
$reports = \App\Models\Report::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.reports.index'));
$response->assertOk();
$response->assertViewIs('Staff.report.index');
$response->assertViewHas('reports', $reports);
// TODO: perform additional assertions
});
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.');
$report = \App\Models\Report::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.reports.show', [$report]));
$response->assertOk();
$response->assertViewIs('Staff.report.show');
$response->assertViewHas('report', $report);
$response->assertViewHas('urls');
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ReportController::class,
'update',
\App\Http\Requests\Staff\UpdateReportRequest::class
);
});
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.');
$report = \App\Models\Report::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.reports.update', [$report]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.resolutions.create'));
$response->assertOk();
$response->assertViewIs('Staff.resolution.create');
// TODO: perform additional assertions
});
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.');
$resolution = \App\Models\Resolution::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.resolutions.destroy', [$resolution]));
$response->assertOk();
$this->assertModelMissing($resolution);
// TODO: perform additional assertions
});
test('edit 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.');
$resolution = \App\Models\Resolution::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.resolutions.edit', [$resolution]));
$response->assertOk();
$response->assertViewIs('Staff.resolution.edit');
$response->assertViewHas('resolution', $resolution);
// 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.');
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.resolutions.index'));
$response->assertOk();
$response->assertViewIs('Staff.resolution.index');
$response->assertViewHas('resolutions', $resolutions);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ResolutionController::class,
'store',
\App\Http\Requests\Staff\StoreResolutionRequest::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.resolutions.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\ResolutionController::class,
'update',
\App\Http\Requests\Staff\UpdateResolutionRequest::class
);
});
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.');
$resolution = \App\Models\Resolution::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.resolutions.update', [$resolution]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,170 @@
<?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.');
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$genres = \App\Models\Genre::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.rss.create'));
$response->assertOk();
$response->assertViewIs('Staff.rss.create');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('genres', $genres);
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
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.');
$rss = \App\Models\Rss::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.rss.destroy', [$rss]));
$response->assertOk();
$this->assertModelMissing($rss);
// TODO: perform additional assertions
});
test('destroy 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.');
$rss = \App\Models\Rss::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($user)->delete(route('staff.rss.destroy', [$rss]));
$response->assertForbidden();
});
test('edit 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.');
$rss = \App\Models\Rss::factory()->create();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$genres = \App\Models\Genre::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.rss.edit', [$rss]));
$response->assertOk();
$response->assertViewIs('Staff.rss.edit');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('genres', $genres);
$response->assertViewHas('user', $user);
$response->assertViewHas('rss', $rss);
// TODO: perform additional assertions
});
test('edit 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.');
$rss = \App\Models\Rss::factory()->create();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$genres = \App\Models\Genre::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($user)->get(route('staff.rss.edit', [$rss]));
$response->assertForbidden();
});
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.');
$rsses = \App\Models\Rss::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.rss.index'));
$response->assertOk();
$response->assertViewIs('Staff.rss.index');
$response->assertViewHas('public_rss');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\RssController::class,
'store',
\App\Http\Requests\Staff\StoreRssRequest::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.rss.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\RssController::class,
'update',
\App\Http\Requests\Staff\UpdateRssRequest::class
);
});
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.');
$rss = \App\Models\Rss::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.rss.update', [$rss]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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.');
$rss = \App\Models\Rss::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($user)->patch(route('staff.rss.update', [$rss]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,34 @@
<?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.');
$seedbox = \App\Models\Seedbox::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.seedboxes.destroy', [$seedbox]));
$response->assertOk();
$this->assertModelMissing($seedbox);
// 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.');
$seedboxes = \App\Models\Seedbox::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.seedboxes.index'));
$response->assertOk();
$response->assertViewIs('Staff.seedbox.index');
$response->assertViewHas('seedboxes', $seedboxes);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,107 @@
<?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.types.create'));
$response->assertOk();
$response->assertViewIs('Staff.type.create');
// TODO: perform additional assertions
});
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.');
$type = \App\Models\Type::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.types.destroy', [$type]));
$response->assertOk();
$this->assertModelMissing($type);
// TODO: perform additional assertions
});
test('edit 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.');
$type = \App\Models\Type::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.types.edit', [$type]));
$response->assertOk();
$response->assertViewIs('Staff.type.edit');
$response->assertViewHas('type', $type);
// 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.');
$types = \App\Models\Type::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.types.index'));
$response->assertOk();
$response->assertViewIs('Staff.type.index');
$response->assertViewHas('types', $types);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\TypeController::class,
'store',
\App\Http\Requests\Staff\StoreTypeRequest::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.types.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\TypeController::class,
'update',
\App\Http\Requests\Staff\UpdateTypeRequest::class
);
});
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.');
$type = \App\Models\Type::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.types.update', [$type]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,43 @@
<?php
uses(RefreshDatabase::class);
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\UnbanController::class,
'store',
\App\Http\Requests\Staff\StoreUnbanRequest::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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post(route('staff.unbans.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('store 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($authUser)->post(route('staff.unbans.store'), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,92 @@
<?php
uses(RefreshDatabase::class);
test('edit 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();
$groups = \App\Models\Group::factory()->times(3)->create();
$internals = \App\Models\Internal::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('staff.users.edit', [$user]));
$response->assertOk();
$response->assertViewIs('Staff.user.edit');
$response->assertViewHas('user', $user);
$response->assertViewHas('groups', $groups);
$response->assertViewHas('internals', $internals);
// 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.users.index'));
$response->assertOk();
$response->assertViewIs('Staff.user.index');
// TODO: perform additional assertions
});
test('permissions 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('staff.users.update_permissions', [$user]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\UserController::class,
'update',
\App\Http\Requests\Staff\UpdateUserRequest::class
);
});
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.');
$user = \App\Models\User::factory()->create();
$group = \App\Models\Group::factory()->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('staff.users.update', [$user]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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();
$group = \App\Models\Group::factory()->create();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
$response = $this->actingAs($authUser)->patch(route('staff.users.update', [$user]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,17 @@
<?php
uses(RefreshDatabase::class);
test('check version 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.'));
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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.warnings.index'));
$response->assertOk();
$response->assertViewIs('Staff.warning.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,54 @@
<?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.');
$watchlist = \App\Models\Watchlist::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.watchlist.destroy', [$watchlist]));
$response->assertOk();
$this->assertModelMissing($watchlist);
// 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.watchlist.index'));
$response->assertOk();
$response->assertViewIs('Staff.watchlist.index');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\Staff\WatchlistController::class,
'store',
\App\Http\Requests\Staff\StoreWatchedUserRequest::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.watchlist.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,325 @@
<?php
uses(RefreshDatabase::class);
test('bankers 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('bankers'));
$response->assertOk();
$response->assertViewIs('stats.users.bankers');
$response->assertViewHas('bankers');
// TODO: perform additional assertions
});
test('bountied 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.');
$torrentRequests = \App\Models\TorrentRequest::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('bountied'));
$response->assertOk();
$response->assertViewIs('stats.requests.bountied');
$response->assertViewHas('bountied');
// TODO: perform additional assertions
});
test('clients 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('clients'));
$response->assertOk();
$response->assertViewIs('stats.clients.clients');
$response->assertViewHas('clients');
// TODO: perform additional assertions
});
test('completed 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('completed'));
$response->assertOk();
$response->assertViewIs('stats.torrents.completed');
$response->assertViewHas('completed');
// TODO: perform additional assertions
});
test('dead 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('dead'));
$response->assertOk();
$response->assertViewIs('stats.torrents.dead');
$response->assertViewHas('dead');
// TODO: perform additional assertions
});
test('downloaded 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('downloaded'));
$response->assertOk();
$response->assertViewIs('stats.users.downloaded');
$response->assertViewHas('downloaded');
// TODO: perform additional assertions
});
test('dying 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('dying'));
$response->assertOk();
$response->assertViewIs('stats.torrents.dying');
$response->assertViewHas('dying');
// TODO: perform additional assertions
});
test('group 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.');
$group = \App\Models\Group::factory()->create();
$users = \App\Models\User::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('group', ['id' => $id]));
$response->assertOk();
$response->assertViewIs('stats.groups.group');
$response->assertViewHas('users', $users);
$response->assertViewHas('group', $group);
// TODO: perform additional assertions
});
test('groups 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.');
$groups = \App\Models\Group::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('groups'));
$response->assertOk();
$response->assertViewIs('stats.groups.groups');
$response->assertViewHas('groups', $groups);
// 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.');
$categories = \App\Models\Category::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('stats'));
$response->assertOk();
$response->assertViewIs('stats.index');
$response->assertViewHas('all_user');
$response->assertViewHas('active_user');
$response->assertViewHas('disabled_user');
$response->assertViewHas('pruned_user');
$response->assertViewHas('banned_user');
$response->assertViewHas('num_torrent');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('num_hd');
$response->assertViewHas('num_sd');
$response->assertViewHas('torrent_size');
$response->assertViewHas('num_seeders');
$response->assertViewHas('num_leechers');
$response->assertViewHas('num_peers');
$response->assertViewHas('actual_upload');
$response->assertViewHas('actual_download');
$response->assertViewHas('actual_up_down');
$response->assertViewHas('credited_upload');
$response->assertViewHas('credited_download');
$response->assertViewHas('credited_up_down');
// TODO: perform additional assertions
});
test('languages 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('languages'));
$response->assertOk();
$response->assertViewIs('stats.languages.languages');
$response->assertViewHas('languages');
// TODO: perform additional assertions
});
test('leeched 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('leeched'));
$response->assertOk();
$response->assertViewIs('stats.torrents.leeched');
$response->assertViewHas('leeched');
// TODO: perform additional assertions
});
test('leechers 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.');
$peers = \App\Models\Peer::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('leechers'));
$response->assertOk();
$response->assertViewIs('stats.users.leechers');
$response->assertViewHas('leechers');
// TODO: perform additional assertions
});
test('seeded 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('seeded'));
$response->assertOk();
$response->assertViewIs('stats.torrents.seeded');
$response->assertViewHas('seeded');
// TODO: perform additional assertions
});
test('seeders 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.');
$peers = \App\Models\Peer::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('seeders'));
$response->assertOk();
$response->assertViewIs('stats.users.seeders');
$response->assertViewHas('seeders');
// TODO: perform additional assertions
});
test('seedsize 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('seedsize'));
$response->assertOk();
$response->assertViewIs('stats.users.seedsize');
$response->assertViewHas('users', $users);
// TODO: perform additional assertions
});
test('seedtime 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('seedtime'));
$response->assertOk();
$response->assertViewIs('stats.users.seedtime');
$response->assertViewHas('users', $users);
// TODO: perform additional assertions
});
test('themes 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('themes'));
$response->assertOk();
$response->assertViewIs('stats.themes.index');
$response->assertViewHas('siteThemes');
$response->assertViewHas('customThemes');
$response->assertViewHas('standaloneThemes');
// TODO: perform additional assertions
});
test('uploaded 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('uploaded'));
$response->assertOk();
$response->assertViewIs('stats.users.uploaded');
$response->assertViewHas('uploaded');
// TODO: perform additional assertions
});
test('uploaders 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.');
$torrents = \App\Models\Torrent::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('uploaders'));
$response->assertOk();
$response->assertViewIs('stats.users.uploaders');
$response->assertViewHas('uploaders');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,91 @@
<?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.');
$subscription = \App\Models\Subscription::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('subscriptions.destroy', ['id' => $subscription->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('destroy 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.');
$subscription = \App\Models\Subscription::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('subscriptions.destroy', ['id' => $subscription->id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
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('subscriptions.index'));
$response->assertOk();
$response->assertViewIs('forum.subscriptions');
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
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('subscriptions.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('store 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();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('subscriptions.store'), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('store 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();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('subscriptions.store'), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,136 @@
<?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.');
$torrent = \App\Models\Torrent::factory()->create();
$mediaLanguages = \App\Models\MediaLanguage::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('subtitles.create'));
$response->assertOk();
$response->assertViewIs('subtitle.create');
$response->assertViewHas('torrent', $torrent);
$response->assertViewHas('media_languages');
// TODO: perform additional assertions
});
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.');
$subtitle = \App\Models\Subtitle::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('subtitles.destroy', [$subtitle]));
$response->assertOk();
$this->assertModelMissing($subtitle);
// TODO: perform additional assertions
});
test('destroy 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.');
$subtitle = \App\Models\Subtitle::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('subtitles.destroy', [$subtitle]));
$response->assertForbidden();
});
test('download 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.');
$subtitle = \App\Models\Subtitle::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('subtitles.download', [$subtitle]));
$response->assertOk();
// 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('subtitles.index'));
$response->assertOk();
$response->assertViewIs('subtitle.index');
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\SubtitleController::class,
'store',
\App\Http\Requests\StoreSubtitleRequest::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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('subtitles.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\SubtitleController::class,
'update',
\App\Http\Requests\UpdateSubtitleRequest::class
);
});
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.');
$subtitle = \App\Models\Subtitle::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('subtitles.update', [$subtitle]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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.');
$subtitle = \App\Models\Subtitle::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->patch(route('subtitles.update', [$subtitle]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,62 @@
<?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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('tickets.assignee.destroy', [$ticket]));
$response->assertOk();
$this->assertModelMissing($ticket);
// TODO: perform additional assertions
});
test('destroy 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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('tickets.assignee.destroy', [$ticket]));
$response->assertForbidden();
});
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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('tickets.assignee.store', [$ticket]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('store 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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('tickets.assignee.store', [$ticket]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,37 @@
<?php
uses(RefreshDatabase::class);
test('download 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.');
$ticket = \App\Models\Ticket::factory()->create();
$ticketAttachment = \App\Models\TicketAttachment::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('tickets.attachment.download', [$ticket, 'attachment' => $ticketAttachment->attachment]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('download 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.');
$ticket = \App\Models\Ticket::factory()->create();
$ticketAttachment = \App\Models\TicketAttachment::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('tickets.attachment.download', [$ticket, 'attachment' => $ticketAttachment->attachment]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,143 @@
<?php
uses(RefreshDatabase::class);
test('close 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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('tickets.close', [$ticket]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('close 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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('tickets.close', [$ticket]), [
// TODO: send request data
]);
$response->assertForbidden();
});
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.');
$ticketCategories = \App\Models\TicketCategory::factory()->times(3)->create();
$ticketPriorities = \App\Models\TicketPriority::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('tickets.create'));
$response->assertOk();
$response->assertViewIs('ticket.create');
$response->assertViewHas('categories');
$response->assertViewHas('priorities');
// TODO: perform additional assertions
});
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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('tickets.destroy', [$ticket]));
$response->assertOk();
$this->assertModelMissing($ticket);
// TODO: perform additional assertions
});
test('destroy 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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('tickets.destroy', [$ticket]));
$response->assertForbidden();
});
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('tickets.index'));
$response->assertOk();
$response->assertViewIs('ticket.index');
// TODO: perform additional assertions
});
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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('tickets.show', [$ticket]));
$response->assertOk();
$response->assertViewIs('ticket.show');
$response->assertViewHas('user', $user);
$response->assertViewHas('ticket', $ticket);
// 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.');
$ticket = \App\Models\Ticket::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->get(route('tickets.show', [$ticket]));
$response->assertForbidden();
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\TicketController::class,
'store',
\App\Http\Requests\StoreTicketRequest::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('tickets.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,18 @@
<?php
uses(RefreshDatabase::class);
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('top10.index'));
$response->assertOk();
$response->assertViewIs('top10.index');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,203 @@
<?php
uses(RefreshDatabase::class);
test('close 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.close', ['id' => $topic->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
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.');
$forum = \App\Models\Forum::factory()->create();
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('topics.create', ['id' => $topic->id]));
$response->assertOk();
$response->assertViewIs('forum.forum_topic.create');
$response->assertViewHas('forum', $forum);
// TODO: perform additional assertions
});
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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('topics.destroy', ['id' => $topic->id]));
$response->assertOk();
$this->assertModelMissing($topic);
// TODO: perform additional assertions
});
test('edit 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.');
$topic = \App\Models\Topic::factory()->create();
$forums = \App\Models\Forum::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('topics.edit', ['id' => $topic->id]));
$response->assertOk();
$response->assertViewIs('forum.topic.edit');
$response->assertViewHas('topic', $topic);
$response->assertViewHas('categories');
// TODO: perform additional assertions
});
test('edit 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.');
$topic = \App\Models\Topic::factory()->create();
$forums = \App\Models\Forum::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->get(route('topics.edit', ['id' => $topic->id]));
$response->assertForbidden();
});
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('topics.index'));
$response->assertOk();
$response->assertViewIs('forum.topic.index');
// TODO: perform additional assertions
});
test('open 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.open', ['id' => $topic->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('pin 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.pin', ['id' => $topic->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
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.');
$topic = \App\Models\Topic::factory()->create();
$subscription = \App\Models\Subscription::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('topics.show', ['id' => $topic->id]));
$response->assertOk();
$response->assertViewIs('forum.topic.show');
$response->assertViewHas('topic', $topic);
$response->assertViewHas('forum');
$response->assertViewHas('subscription', $subscription);
// TODO: perform additional assertions
});
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.');
$forum = \App\Models\Forum::factory()->create();
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.store', ['id' => $topic->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('unpin 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.unpin', ['id' => $topic->id]), [
// 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('topics.update', ['id' => $topic->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->patch(route('topics.update', ['id' => $topic->id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,110 @@
<?php
uses(RefreshDatabase::class);
test('approve 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.approve', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('bug 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.bug', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('deny 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.deny', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('implement 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.implement', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('invalid 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.invalid', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('solve 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.solve', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('suggest 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.');
$topic = \App\Models\Topic::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.suggest', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,230 @@
<?php
uses(RefreshDatabase::class);
test('bump 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('bumpTorrent', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('bump torrent 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('bumpTorrent', ['id' => $id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('freeleech token 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('freeleech_token', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('grant double up 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_doubleup', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('grant double up 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('torrent_doubleup', ['id' => $id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('grant f l 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_fl', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('grant f l 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('torrent_fl', ['id' => $id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('grant featured 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_feature', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('grant featured 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('torrent_feature', ['id' => $id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('revoke featured 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_revokefeature', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('revoke featured 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('torrent_revokefeature', ['id' => $id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('set refundable 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('refundable', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('set refundable 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('refundable', ['id' => $id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
test('sticky 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();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_sticky', ['id' => $id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('sticky 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->post(route('torrent_sticky', ['id' => $id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,215 @@
<?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.');
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$regions = \App\Models\Region::factory()->times(3)->create();
$distributors = \App\Models\Distributor::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('torrents.create'));
$response->assertOk();
$response->assertViewIs('torrent.create');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('regions', $regions);
$response->assertViewHas('distributors', $distributors);
$response->assertViewHas('user', $user);
$response->assertViewHas('category_id');
$response->assertViewHas('title');
$response->assertViewHas('imdb');
$response->assertViewHas('tmdb');
$response->assertViewHas('mal');
$response->assertViewHas('tvdb');
$response->assertViewHas('igdb');
// TODO: perform additional assertions
});
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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->delete(route('torrents.destroy', ['id' => $torrent->id]));
$response->assertOk();
$this->assertModelMissing($torrent);
// TODO: perform additional assertions
});
test('destroy 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->delete(route('torrents.destroy', ['id' => $torrent->id]));
$response->assertForbidden();
});
test('edit 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();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$regions = \App\Models\Region::factory()->times(3)->create();
$distributors = \App\Models\Distributor::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('torrents.edit', ['id' => $torrent->id]));
$response->assertOk();
$response->assertViewIs('torrent.edit');
$response->assertViewHas('categories', $categories);
$response->assertViewHas('types', $types);
$response->assertViewHas('resolutions', $resolutions);
$response->assertViewHas('regions', $regions);
$response->assertViewHas('distributors', $distributors);
$response->assertViewHas('keywords');
$response->assertViewHas('torrent', $torrent);
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
test('edit 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.');
$torrent = \App\Models\Torrent::factory()->create();
$categories = \App\Models\Category::factory()->times(3)->create();
$types = \App\Models\Type::factory()->times(3)->create();
$resolutions = \App\Models\Resolution::factory()->times(3)->create();
$regions = \App\Models\Region::factory()->times(3)->create();
$distributors = \App\Models\Distributor::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->get(route('torrents.edit', ['id' => $torrent->id]));
$response->assertForbidden();
});
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('torrents.index'));
$response->assertOk();
$response->assertViewIs('torrent.index');
// TODO: perform additional assertions
});
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.');
$torrent = \App\Models\Torrent::factory()->create();
$tv = \App\Models\Tv::factory()->create();
$movie = \App\Models\Movie::factory()->create();
$featuredTorrent = \App\Models\FeaturedTorrent::factory()->create();
$history = \App\Models\History::factory()->create();
$audits = \App\Models\Audit::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('torrents.show', ['id' => $torrent->id]));
$response->assertOk();
$response->assertViewIs('torrent.show');
$response->assertViewHas('torrent', $torrent);
$response->assertViewHas('user', $user);
$response->assertViewHas('personal_freeleech');
$response->assertViewHas('freeleech_token');
$response->assertViewHas('meta');
$response->assertViewHas('trailer');
$response->assertViewHas('platforms');
$response->assertViewHas('total_tips');
$response->assertViewHas('user_tips');
$response->assertViewHas('featured');
$response->assertViewHas('mediaInfo');
$response->assertViewHas('last_seed_activity');
$response->assertViewHas('playlists');
$response->assertViewHas('audits', $audits);
// TODO: perform additional assertions
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\TorrentController::class,
'store',
\App\Http\Requests\StoreTorrentRequest::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.');
$category = \App\Models\Category::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->post(route('torrents.store'), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\TorrentController::class,
'update',
\App\Http\Requests\UpdateTorrentRequest::class
);
});
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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->patch(route('torrents.update', ['id' => $torrent->id]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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.');
$torrent = \App\Models\Torrent::factory()->create();
$user = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($user)->patch(route('torrents.update', ['id' => $torrent->id]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,36 @@
<?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.');
$torrent = \App\Models\Torrent::factory()->create();
$torrentDownload = \App\Models\TorrentDownload::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('download_check', ['id' => $torrentDownload->id]));
$response->assertOk();
$response->assertViewIs('torrent.download_check');
$response->assertViewHas('torrent', $torrent);
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
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.');
$torrent = \App\Models\Torrent::factory()->create();
$torrentDownload = \App\Models\TorrentDownload::factory()->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('download', ['id' => $torrentDownload->id]));
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,22 @@
<?php
uses(RefreshDatabase::class);
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.');
$torrent = \App\Models\Torrent::factory()->create();
$histories = \App\Models\History::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('history', ['id' => $id]));
$response->assertOk();
$response->assertViewIs('torrent.history');
$response->assertViewHas('torrent', $torrent);
$response->assertViewHas('histories', $histories);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,22 @@
<?php
uses(RefreshDatabase::class);
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.');
$torrent = \App\Models\Torrent::factory()->create();
$peers = \App\Models\Peer::factory()->times(3)->create();
$user = \App\Models\User::factory()->create();
$response = $this->actingAs($user)->get(route('peers', ['id' => $id]));
$response->assertOk();
$response->assertViewIs('torrent.peers');
$response->assertViewHas('torrent', $torrent);
$response->assertViewHas('peers', $peers);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,23 @@
<?php
uses(RefreshDatabase::class);
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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.achievements.index', [$user]));
$response->assertOk();
$response->assertViewIs('user.achievement.index');
$response->assertViewHas('route');
$response->assertViewHas('user', $user);
$response->assertViewHas('achievements');
$response->assertViewHas('pending');
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,33 @@
<?php
uses(RefreshDatabase::class);
test('edit 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.apikey.edit', [$user]));
$response->assertOk();
$response->assertViewIs('user.apikey.edit');
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
test('edit 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($authUser)->get(route('users.apikey.edit', [$user]));
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,46 @@
<?php
uses(RefreshDatabase::class);
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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.earnings.index', [$user]));
$response->assertOk();
$response->assertViewIs('user.earning.index');
$response->assertViewHas('user', $user);
$response->assertViewHas('bon');
$response->assertViewHas('dying');
$response->assertViewHas('legendary');
$response->assertViewHas('old');
$response->assertViewHas('huge');
$response->assertViewHas('large');
$response->assertViewHas('regular');
$response->assertViewHas('participant');
$response->assertViewHas('teamplayer');
$response->assertViewHas('committed');
$response->assertViewHas('mvp');
$response->assertViewHas('legend');
$response->assertViewHas('total');
// TODO: perform additional assertions
});
test('index 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($authUser)->get(route('users.earnings.index', [$user]));
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,33 @@
<?php
uses(RefreshDatabase::class);
test('edit 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.email.edit', [$user]));
$response->assertOk();
$response->assertViewIs('user.email.edit');
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
test('edit 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($authUser)->get(route('users.email.edit', [$user]));
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,50 @@
<?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.');
$user = \App\Models\User::factory()->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.followers.destroy', [$user]));
$response->assertOk();
$this->assertModelMissing($user);
// 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.followers.index', [$user]));
$response->assertOk();
$response->assertViewIs('user.follower.index');
$response->assertViewHas('followers');
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.followers.store', [$user]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,21 @@
<?php
uses(RefreshDatabase::class);
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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.following.index', [$user]));
$response->assertOk();
$response->assertViewIs('user.following.index');
$response->assertViewHas('followings');
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,63 @@
<?php
uses(RefreshDatabase::class);
test('edit 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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.general_settings.edit', [$user]));
$response->assertOk();
$response->assertViewIs('user.general_setting.edit');
$response->assertViewHas('user', $user);
// TODO: perform additional assertions
});
test('edit 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($authUser)->get(route('users.general_settings.edit', [$user]));
$response->assertForbidden();
});
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.');
$user = \App\Models\User::factory()->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.general_settings.update', [$user]), [
// TODO: send request data
]);
$response->assertOk();
// TODO: perform additional assertions
});
test('update 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($authUser)->patch(route('users.general_settings.update', [$user]), [
// TODO: send request data
]);
$response->assertForbidden();
});
// test cases...

View File

@@ -0,0 +1,91 @@
<?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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.gifts.create', [$user]));
$response->assertOk();
$response->assertViewIs('user.gift.create');
$response->assertViewHas('user', $user);
$response->assertViewHas('bon');
// TODO: perform additional assertions
});
test('create 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($authUser)->get(route('users.gifts.create', [$user]));
$response->assertForbidden();
});
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();
$bonTransactions = \App\Models\BonTransactions::factory()->times(3)->create();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.gifts.index', [$user]));
$response->assertOk();
$response->assertViewIs('user.gift.index');
$response->assertViewHas('user', $user);
$response->assertViewHas('gifts');
$response->assertViewHas('bon');
$response->assertViewHas('sentGifts');
$response->assertViewHas('receivedGifts');
// TODO: perform additional assertions
});
test('index 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();
$bonTransactions = \App\Models\BonTransactions::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.gifts.index', [$user]));
$response->assertForbidden();
});
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
\App\Http\Controllers\User\GiftController::class,
'store',
\App\Http\Requests\StoreGiftRequest::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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.gifts.store', [$user]), [
// TODO: send request data
]);
$response->assertRedirect(withSuccess(trans('bon.gift-sent')));
// TODO: perform additional assertions
});
// test cases...

View File

@@ -0,0 +1,34 @@
<?php
uses(RefreshDatabase::class);
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();
$authUser = \App\Models\User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.history.index', [$user]));
$response->assertOk();
$response->assertViewIs('user.history.index');
$response->assertViewHas('user', $user);
$response->assertViewHas('history');
// TODO: perform additional assertions
});
test('index 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();
$authUser = \App\Models\User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
$response = $this->actingAs($authUser)->get(route('users.history.index', [$user]));
$response->assertForbidden();
});
// test cases...

Some files were not shown because too many files have changed in this diff Show More