mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-20 03:39:48 -06:00
Merge pull request #2884 from HDInnovations/shift-95078
Tests Generator
This commit is contained in:
@@ -52,7 +52,9 @@
|
||||
"pestphp/pest-plugin-laravel": "^2.0",
|
||||
"pestphp/pest-plugin-livewire": "^2.0",
|
||||
"phpunit/phpunit": "10.2.3",
|
||||
"spatie/laravel-ignition": "^2.2"
|
||||
"spatie/laravel-ignition": "^2.2",
|
||||
"jasonmccreary/laravel-test-assertions": "^2.3",
|
||||
"laravel-shift/factory-generator": "dev-master"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
|
||||
160
composer.lock
generated
160
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ee23bca7ba5ecee28be962a5b0375b74",
|
||||
"content-hash": "cc118cb19b45223e08f2a9859a03802e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "assada/laravel-achievements",
|
||||
@@ -8538,6 +8538,56 @@
|
||||
},
|
||||
"time": "2020-07-09T08:09:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jasonmccreary/laravel-test-assertions",
|
||||
"version": "v2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jasonmccreary/laravel-test-assertions.git",
|
||||
"reference": "77d1812dce4438c294e281acade9d52adf4ce0a0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jasonmccreary/laravel-test-assertions/zipball/77d1812dce4438c294e281acade9d52adf4ce0a0",
|
||||
"reference": "77d1812dce4438c294e281acade9d52adf4ce0a0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/testing": "^9.0|^10.0",
|
||||
"mockery/mockery": "^1.4.2",
|
||||
"php": "^8.0",
|
||||
"phpunit/phpunit": "^9.3.3|^10.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"JMac\\Testing\\AdditionalAssertionsServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JMac\\Testing\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jason McCreary",
|
||||
"email": "jason@pureconcepts.net"
|
||||
}
|
||||
],
|
||||
"description": "A set of helpful assertions when testing Laravel applications.",
|
||||
"support": {
|
||||
"issues": "https://github.com/jasonmccreary/laravel-test-assertions/issues",
|
||||
"source": "https://github.com/jasonmccreary/laravel-test-assertions/tree/v2.3"
|
||||
},
|
||||
"time": "2023-03-15T16:29:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jean85/pretty-package-versions",
|
||||
"version": "2.0.5",
|
||||
@@ -8597,6 +8647,60 @@
|
||||
},
|
||||
"time": "2021-10-08T21:21:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel-shift/factory-generator",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel-shift/factory-generator.git",
|
||||
"reference": "63903d5fccfb5f85ae31dba1937ad3cd4bd83112"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel-shift/factory-generator/zipball/63903d5fccfb5f85ae31dba1937ad3cd4bd83112",
|
||||
"reference": "63903d5fccfb5f85ae31dba1937ad3cd4bd83112",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"illuminate/support": "^9.0|^10.0",
|
||||
"naoray/eloquent-model-analyzer": "^3.0|^4.0",
|
||||
"nikic/php-parser": "^4.15"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^7.0|^8.0"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "package",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Shift\\FactoryGenerator\\FactoryGeneratorServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Shift\\FactoryGenerator\\": "./src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "Generate factories from existing models",
|
||||
"keywords": [
|
||||
"factory",
|
||||
"laravel",
|
||||
"model",
|
||||
"testing"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel-shift/factory-generator/issues",
|
||||
"source": "https://github.com/laravel-shift/factory-generator/tree/master"
|
||||
},
|
||||
"time": "2023-03-09T16:47:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
"version": "v1.10.4",
|
||||
@@ -8865,6 +8969,57 @@
|
||||
],
|
||||
"time": "2023-03-08T13:26:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "naoray/eloquent-model-analyzer",
|
||||
"version": "v4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Naoray/eloquent-model-analyzer.git",
|
||||
"reference": "cdc4639a06250e94b85122fa3e17952a560c2427"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Naoray/eloquent-model-analyzer/zipball/cdc4639a06250e94b85122fa3e17952a560c2427",
|
||||
"reference": "cdc4639a06250e94b85122fa3e17952a560c2427",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/dbal": "^2.6|^3.0",
|
||||
"illuminate/database": "^8.40.0|^9.0|^10.0",
|
||||
"illuminate/support": "^8.24.0|^9.0|^10.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^6.0|^7.0|^8.0"
|
||||
},
|
||||
"type": "pakage",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Naoray\\EloquentModelAnalyzer\\": "./src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Krishan Koenig",
|
||||
"email": "krishan.koenig@googlemail.com"
|
||||
}
|
||||
],
|
||||
"description": "Helpful methods to gain more information about eloquent model classes.",
|
||||
"support": {
|
||||
"issues": "https://github.com/Naoray/eloquent-model-analyzer/issues",
|
||||
"source": "https://github.com/Naoray/eloquent-model-analyzer/tree/v4.0.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/naoray",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-20T17:07:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/collision",
|
||||
"version": "v7.7.0",
|
||||
@@ -11476,7 +11631,8 @@
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"theodorejb/polycast": 20
|
||||
"theodorejb/polycast": 20,
|
||||
"laravel-shift/factory-generator": 20
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
<env name="REDIS_HOST" value="127.0.0.1" />
|
||||
<env name="REDIS_PORT" value="6379" />
|
||||
-->
|
||||
</php>
|
||||
<env name="DB_DATABASE" value=":memory:"/>
|
||||
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||
</php>
|
||||
<coverage/>
|
||||
<source>
|
||||
<include>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoBanDisposableUsers
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:ban_disposable_users')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoBonAllocationTest.php
Normal file
14
tests/Feature/Console/Commands/AutoBonAllocationTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoBonAllocation
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:bon_allocation')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoCorrectHistoryTest.php
Normal file
14
tests/Feature/Console/Commands/AutoCorrectHistoryTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoCorrectHistory
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:correct_history')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoDeactivateWarningTest.php
Normal file
14
tests/Feature/Console/Commands/AutoDeactivateWarningTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoDeactivateWarning
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:deactivate_warning')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoDisableInactiveUsers
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:disable_inactive_users')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoFlushPeersTest.php
Normal file
14
tests/Feature/Console/Commands/AutoFlushPeersTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoFlushPeers
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:flush_peers')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoGraveyardTest.php
Normal file
14
tests/Feature/Console/Commands/AutoGraveyardTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoGraveyard
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:graveyard')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoGroupTest.php
Normal file
14
tests/Feature/Console/Commands/AutoGroupTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoGroup
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:group')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoHighspeedTagTest.php
Normal file
14
tests/Feature/Console/Commands/AutoHighspeedTagTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoHighspeedTag
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:highspeed_tag')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoNerdStatTest.php
Normal file
14
tests/Feature/Console/Commands/AutoNerdStatTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoNerdStat
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:nerdstat')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoPreWarningTest.php
Normal file
14
tests/Feature/Console/Commands/AutoPreWarningTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoPreWarning
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:prewarning')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoRecycleAuditsTest.php
Normal file
14
tests/Feature/Console/Commands/AutoRecycleAuditsTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRecycleAudits
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:recycle_activity_log')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRecycleClaimedTorrentRequests
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:recycle_claimed_torrent_requests')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRecycleFailedLogins
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:recycle_failed_logins')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoRecycleInvitesTest.php
Normal file
14
tests/Feature/Console/Commands/AutoRecycleInvitesTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRecycleInvites
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:recycle_invites')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoRefundDownloadTest.php
Normal file
14
tests/Feature/Console/Commands/AutoRefundDownloadTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRefundDownload
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:refund_download')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRemoveFeaturedTorrent
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:remove_featured_torrent')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRemovePersonalFreeleech
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:remove_personal_freeleech')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoRemoveTimedTorrentBuffs
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:remove_torrent_buffs')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoResetUserFlushesTest.php
Normal file
14
tests/Feature/Console/Commands/AutoResetUserFlushesTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoResetUserFlushes
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:reset_user_flushes')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoSoftDeleteDisabledUsers
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:softdelete_disabled_users')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoStatsClientsTest.php
Normal file
14
tests/Feature/Console/Commands/AutoStatsClientsTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoStatsClients
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:stats_clients')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoTorrentBalanceTest.php
Normal file
14
tests/Feature/Console/Commands/AutoTorrentBalanceTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoTorrentBalance
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:torrent_balance')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/AutoWarningTest.php
Normal file
14
tests/Feature/Console/Commands/AutoWarningTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\AutoWarning
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:warning')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/CheckForStaleTicketsTest.php
Normal file
14
tests/Feature/Console/Commands/CheckForStaleTicketsTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\CheckForStaleTickets
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('tickets:stale')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/ClearCacheTest.php
Normal file
14
tests/Feature/Console/Commands/ClearCacheTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\ClearCache
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('clear:all_cache')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/DbDumpTest.php
Normal file
14
tests/Feature/Console/Commands/DbDumpTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\DbDump
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('db:dump')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/DbLoadTest.php
Normal file
14
tests/Feature/Console/Commands/DbLoadTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\DbLoad
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('db:load')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/EmailBlacklistUpdateTest.php
Normal file
14
tests/Feature/Console/Commands/EmailBlacklistUpdateTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\EmailBlacklistUpdate
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:email-blacklist-update')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/FetchReleaseYearsTest.php
Normal file
14
tests/Feature/Console/Commands/FetchReleaseYearsTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\FetchReleaseYears
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('fetch:release_years')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/GitUpdaterTest.php
Normal file
14
tests/Feature/Console/Commands/GitUpdaterTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\GitUpdater
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('git:update')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/SetCacheTest.php
Normal file
14
tests/Feature/Console/Commands/SetCacheTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\SetCache
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('set:all_cache')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/SyncPeersTest.php
Normal file
14
tests/Feature/Console/Commands/SyncPeersTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\SyncPeers
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:sync_peers')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\SyncTorrentSeasonEpisode
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('auto:sync_torrent_season_episode')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/TestMailSettingsTest.php
Normal file
14
tests/Feature/Console/Commands/TestMailSettingsTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\TestMailSettings
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('test:email')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
14
tests/Feature/Console/Commands/VendorCleanupTest.php
Normal file
14
tests/Feature/Console/Commands/VendorCleanupTest.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see \App\Console\Commands\VendorCleanup
|
||||
*/
|
||||
it('runs successfully', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$this->artisan('vendor:cleanup')
|
||||
->assertExitCode(0)
|
||||
->run();
|
||||
|
||||
// TODO: perform additional assertions to ensure the command behaved as expected
|
||||
});
|
||||
289
tests/Feature/Http/Controllers/API/ChatControllerTest.php
Normal file
289
tests/Feature/Http/Controllers/API/ChatControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
43
tests/Feature/Http/Controllers/BountyControllerTest.php
Normal file
43
tests/Feature/Http/Controllers/BountyControllerTest.php
Normal 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...
|
||||
57
tests/Feature/Http/Controllers/ClaimControllerTest.php
Normal file
57
tests/Feature/Http/Controllers/ClaimControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
38
tests/Feature/Http/Controllers/ForumControllerTest.shift.php
Normal file
38
tests/Feature/Http/Controllers/ForumControllerTest.shift.php
Normal 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...
|
||||
48
tests/Feature/Http/Controllers/HomeControllerTest.shift.php
Normal file
48
tests/Feature/Http/Controllers/HomeControllerTest.shift.php
Normal 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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
18
tests/Feature/Http/Controllers/MissingControllerTest.php
Normal file
18
tests/Feature/Http/Controllers/MissingControllerTest.php
Normal 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...
|
||||
93
tests/Feature/Http/Controllers/PageControllerTest.php
Normal file
93
tests/Feature/Http/Controllers/PageControllerTest.php
Normal 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...
|
||||
182
tests/Feature/Http/Controllers/PlaylistControllerTest.php
Normal file
182
tests/Feature/Http/Controllers/PlaylistControllerTest.php
Normal 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...
|
||||
108
tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php
Normal file
108
tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php
Normal 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...
|
||||
18
tests/Feature/Http/Controllers/PlaylistZipControllerTest.php
Normal file
18
tests/Feature/Http/Controllers/PlaylistZipControllerTest.php
Normal 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...
|
||||
35
tests/Feature/Http/Controllers/PollControllerTest.php
Normal file
35
tests/Feature/Http/Controllers/PollControllerTest.php
Normal 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...
|
||||
44
tests/Feature/Http/Controllers/PollVoteControllerTest.php
Normal file
44
tests/Feature/Http/Controllers/PollVoteControllerTest.php
Normal 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...
|
||||
137
tests/Feature/Http/Controllers/PostControllerTest.php
Normal file
137
tests/Feature/Http/Controllers/PostControllerTest.php
Normal 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...
|
||||
52
tests/Feature/Http/Controllers/ReportControllerTest.php
Normal file
52
tests/Feature/Http/Controllers/ReportControllerTest.php
Normal 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...
|
||||
174
tests/Feature/Http/Controllers/RequestControllerTest.php
Normal file
174
tests/Feature/Http/Controllers/RequestControllerTest.php
Normal 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...
|
||||
56
tests/Feature/Http/Controllers/RequestFillControllerTest.php
Normal file
56
tests/Feature/Http/Controllers/RequestFillControllerTest.php
Normal 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...
|
||||
22
tests/Feature/Http/Controllers/ReseedControllerTest.php
Normal file
22
tests/Feature/Http/Controllers/ReseedControllerTest.php
Normal 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...
|
||||
155
tests/Feature/Http/Controllers/RssControllerTest.php
Normal file
155
tests/Feature/Http/Controllers/RssControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
32
tests/Feature/Http/Controllers/Staff/AuditControllerTest.php
Normal file
32
tests/Feature/Http/Controllers/Staff/AuditControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
58
tests/Feature/Http/Controllers/Staff/BanControllerTest.php
Normal file
58
tests/Feature/Http/Controllers/Staff/BanControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
144
tests/Feature/Http/Controllers/Staff/CommandControllerTest.php
Normal file
144
tests/Feature/Http/Controllers/Staff/CommandControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
36
tests/Feature/Http/Controllers/Staff/FlushControllerTest.php
Normal file
36
tests/Feature/Http/Controllers/Staff/FlushControllerTest.php
Normal 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...
|
||||
118
tests/Feature/Http/Controllers/Staff/ForumControllerTest.php
Normal file
118
tests/Feature/Http/Controllers/Staff/ForumControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
30
tests/Feature/Http/Controllers/Staff/HomeControllerTest.php
Normal file
30
tests/Feature/Http/Controllers/Staff/HomeControllerTest.php
Normal 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...
|
||||
107
tests/Feature/Http/Controllers/Staff/InternalControllerTest.php
Normal file
107
tests/Feature/Http/Controllers/Staff/InternalControllerTest.php
Normal 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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
@@ -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...
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user