attempt to fix dupe chatroom error in tests

This commit is contained in:
Roardom
2026-01-08 12:14:35 +00:00
parent 1335fe5ca8
commit 7504bf30ba
22 changed files with 4 additions and 302 deletions
@@ -97,7 +97,7 @@ return new class () extends Migration {
$table->dropIndex(['user_id']);
$table->foreign('user_id')->references('id')->on('users')->cascadeOnUpdate();
$table->dropIndex(['gifted_user_id']);
$table->foreign('gifted_user_id')->references('id')->on('users')->cascadeOnUpdate()->nullOnDelete();
$table->foreign('gifted_user_id')->references('id')->on('users')->cascadeOnUpdate();
});
DB::table('forum_permissions')
+1 -1
View File
@@ -480,7 +480,7 @@ CREATE TABLE `donations` (
KEY `donations_package_id_index` (`package_id`),
KEY `donations_user_id_foreign` (`user_id`),
KEY `donations_gifted_user_id_foreign` (`gifted_user_id`),
CONSTRAINT `donations_gifted_user_id_foreign` FOREIGN KEY (`gifted_user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `donations_gifted_user_id_foreign` FOREIGN KEY (`gifted_user_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
CONSTRAINT `donations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -25,14 +25,11 @@ use App\Models\User;
use Database\Seeders\UserSeeder;
test('create a poll returns an ok response', function (): void {
$this->seed(UserSeeder::class);
// Poll chat announcements needs a system user, a bot and a chatroom
$this->seed(UserSeeder::class);
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'is_modo' => 1,
@@ -69,14 +66,11 @@ test('create a poll returns an ok response', function (): void {
});
test('create a poll with expiration date returns an ok response', function (): void {
$this->seed(UserSeeder::class);
// Poll chat announcements needs a system user, a bot and a chatroom
$this->seed(UserSeeder::class);
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'is_modo' => 1,
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Group;
use App\Models\User;
use App\Models\UserNotification;
@@ -33,9 +32,6 @@ test('gift a user creates a notification for the gifted user', function (): void
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -78,9 +74,6 @@ test('gift a user creates a notification for the gifted user when gift notificat
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -130,9 +123,6 @@ test('staff gifts a user creates a notification for the gifted user even when gi
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -182,9 +172,6 @@ test('gift a user does not create a notification for the gifted user when all no
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -223,9 +210,6 @@ test('gift a user does not create a notification for the gifted user when gift n
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -264,9 +248,6 @@ test('gift a user does not create a notification for the gifted user when gift n
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -17,7 +17,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Article;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\User;
@@ -38,9 +37,6 @@ test('user comments on article creates a notification for staff', function (): v
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -91,9 +87,6 @@ test('staff comments on own article does not create a notification for staff', f
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$staffGroup = Group::factory()->create([
'can_comment' => true,
@@ -133,9 +126,6 @@ test('user comments on article does not a notification for staff user when all n
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -17,7 +17,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Article;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\User;
@@ -38,9 +37,6 @@ test('user tags user on article creates a notification for tagged user', functio
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -91,9 +87,6 @@ test('staff tags user on article creates a notification for tagged user even whe
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -147,9 +140,6 @@ test('user tags user on article creates a notification for tagged user when ment
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -202,9 +192,6 @@ test('user tags user on article does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -253,9 +240,6 @@ test('user tags user on article does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -304,9 +288,6 @@ test('user tags user on article does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\Playlist;
@@ -38,9 +37,6 @@ test('comments on playlist creates a notification for playlist owner', function
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -87,9 +83,6 @@ test('user comments on own playlist does not create a notification for self', fu
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -128,9 +121,6 @@ test('comments on playlist does not create a notification for playlist owner whe
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\TorrentRequest;
@@ -38,9 +37,6 @@ test('comment own request does not create a notification for self', function ():
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -82,9 +78,6 @@ test('comment a request creates a notification for the requester', function ():
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -135,9 +128,6 @@ test('comment a request creates a notification for the requester when request co
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -190,9 +180,6 @@ test('comment a request creates a notification for the requester when all notifi
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -239,9 +226,6 @@ test('comment a request creates a notification for the requester when request co
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -288,9 +272,6 @@ test('comment a request creates a notification for the requester when request co
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\Ticket;
@@ -38,9 +37,6 @@ test('user comments own ticket does not create a notification for self but assig
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -97,9 +93,6 @@ test('user comments own ticket does not create a notification for staff when non
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -148,9 +141,6 @@ test('staff comments a ticket creates a notification for the user but not staff'
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -203,9 +193,6 @@ test('staff comments a ticket create a notification for the user even when all n
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\Ticket;
@@ -38,9 +37,6 @@ test('user tags user on ticket creates a notification for tagged user', function
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -94,9 +90,6 @@ test('user tags user on ticket does not create a notification for tagged user wh
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\Torrent;
@@ -38,9 +37,6 @@ test('comment own torrent does not create a notification for self', function ():
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -82,9 +78,6 @@ test('comment a torrent creates a notification for the uploader', function (): v
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -135,9 +128,6 @@ test('comment a torrent creates a notification for the requester when request co
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -190,9 +180,6 @@ test('comment a torrent creates a notification for the requester when all notifi
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -239,9 +226,6 @@ test('comment a torrent creates a notification for the requester when request co
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -288,9 +272,6 @@ test('comment a torrent creates a notification for the requester when request co
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\TorrentRequest;
@@ -38,9 +37,6 @@ test('user tags user on request creates a notification for tagged user', functio
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -90,9 +86,6 @@ test('user tags user on request creates a notification for tagged user when ment
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -144,9 +137,6 @@ test('user tags user on request does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -195,9 +185,6 @@ test('user tags user on request does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -246,9 +233,6 @@ test('user tags user on request does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Http\Livewire\Comments;
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Comment;
use App\Models\Group;
use App\Models\Torrent;
@@ -38,9 +37,6 @@ test('user tags user on torrent creates a notification for tagged user', functio
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -90,9 +86,6 @@ test('user tags user on torrent creates a notification for tagged user when ment
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -144,9 +137,6 @@ test('user tags user on torrent does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -195,9 +185,6 @@ test('user tags user on torrent does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -246,9 +233,6 @@ test('user tags user on torrent does not create a notification for tagged user w
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Forum;
use App\Models\ForumPermission;
use App\Models\Group;
@@ -38,9 +37,6 @@ test('post in a topic creates a notification for the topic creator', function ()
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -102,9 +98,6 @@ test('post in a topic creates a notification for the topic creator when post not
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -167,9 +160,6 @@ test('post in a topic does not create a notification for the topic creator when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -227,9 +217,6 @@ test('post in a topic does not create a notification for the topic creator when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -287,9 +274,6 @@ test('post in a topic does not create a notification for the topic creator when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Forum;
use App\Models\ForumPermission;
use App\Models\Group;
@@ -39,9 +38,6 @@ test('post in a topic creates a notification for the topic subscriber', function
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -113,9 +109,6 @@ test('post in a topic creates a notification for the topic subscriber when subsc
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -189,9 +182,6 @@ test('post in a topic does not create a notification for the topic subscriber wh
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -260,9 +250,6 @@ test('post in a topic does not create a notification for the topic subscriber wh
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -331,9 +318,6 @@ test('post in a topic does not create a notification for the topic subscriber wh
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Group;
use App\Models\Forum;
use App\Models\ForumPermission;
@@ -38,9 +37,6 @@ test('user tags user in forum topic creates a notification for tagged user', fun
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -109,9 +105,6 @@ test('user tags user in forum topic creates a notification for tagged user when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -182,9 +175,6 @@ test('user tags user in forum topic does not create a notification for tagged us
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -252,9 +242,6 @@ test('staff tags user in forum topic creates a notification for tagged user even
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -324,9 +311,6 @@ test('user tags user in forum topic does not create a notification for tagged us
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -394,9 +378,6 @@ test('user tags user in forum topic does not create a notification for tagged us
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_comment' => true,
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Group;
use App\Models\TorrentRequest;
use App\Models\User;
@@ -35,9 +34,6 @@ test('add bounty to request creates a notification for the requester', function
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_request' => true,
@@ -92,9 +88,6 @@ test('add bounty to request creates a notification for the requester when bounty
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_request' => true,
@@ -151,9 +144,6 @@ test('add bounty to request does not create a notification for the requester whe
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_request' => true,
@@ -204,9 +194,6 @@ test('add bounty to request does not create a notification for the requester whe
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_request' => true,
@@ -257,9 +244,6 @@ test('add bounty to request does not create a notification for the requester whe
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create([
'can_request' => true,
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Category;
use App\Models\Group;
use App\Models\Resolution;
@@ -39,9 +38,6 @@ test('accept a request fill creates a notification for the filler', function ():
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$requester = User::factory()->create();
$filler = User::factory()->create();
@@ -95,9 +91,6 @@ test('accept a request fill creates a notification for the filler when request a
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$randomGroup = Group::factory()->create();
@@ -154,9 +147,6 @@ test('accept a request fill creates a notification for the filler when all notif
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$randomGroup = Group::factory()->create();
@@ -208,9 +198,6 @@ test('accept a request fill creates a notification for the filler when fill appr
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$requester = User::factory()->create();
$filler = User::factory()->create();
@@ -260,9 +247,6 @@ test('accept a request fill creates a notification for the filler when request n
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Category;
use App\Models\Group;
use App\Models\Resolution;
@@ -39,9 +38,6 @@ test('fill a request creates a notification for the request creator', function (
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -99,9 +95,6 @@ test('fill a request creates a notification for the request creator when request
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -161,9 +154,6 @@ test('fill a request does not create a notification for the request creator when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -217,9 +207,6 @@ test('fill a request does not create a notification for the request creator when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -273,9 +260,6 @@ test('fill a request does not create a notification for the request creator when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Category;
use App\Models\Group;
use App\Models\Resolution;
@@ -39,9 +38,6 @@ test('decline a request fill creates a notification for the filler', function ()
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$requester = User::factory()->create();
$filler = User::factory()->create();
@@ -96,9 +92,6 @@ test('decline a request fill creates a notification for the filler when request
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$randomGroup = Group::factory()->create();
@@ -156,9 +149,6 @@ test('decline a request fill does not create a notification for the filler when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$requester = User::factory()->create();
$filler = User::factory()->create();
@@ -209,9 +199,6 @@ test('decline a request fill does not create a notification for the filler when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$requester = User::factory()->create();
$filler = User::factory()->create();
@@ -262,9 +249,6 @@ test('decline a request fill does not create a notification for the filler when
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -15,7 +15,6 @@ declare(strict_types=1);
*/
use App\Models\Bot;
use App\Models\Chatroom;
use App\Models\Forum;
use App\Models\ForumPermission;
use App\Models\Group;
@@ -37,9 +36,6 @@ test('create a topic in a subscribed forum creates a notification for the subscr
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -101,9 +97,6 @@ test('create a topic in a subscribed forum creates a notification for the subscr
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
$randomGroup = Group::factory()->create();
@@ -167,9 +160,6 @@ test('create a topic in a subscribed forum does not create a notification for th
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -227,9 +217,6 @@ test('create a topic in a subscribed forum does not create a notification for th
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -287,9 +274,6 @@ test('create a topic in a subscribed forum does not create a notification for th
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
$group = Group::factory()->create();
@@ -16,7 +16,6 @@ declare(strict_types=1);
use App\Models\Bot;
use App\Models\Category;
use App\Models\Chatroom;
use App\Models\Group;
use App\Models\Resolution;
use App\Models\Torrent;
@@ -41,9 +40,6 @@ test('upload a torrent creates a notification for followers', function (): void
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -125,9 +121,6 @@ test('upload a torrent does not create a notification for followers when all not
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -205,9 +198,6 @@ test('upload a torrent does not create a notification for followers when followi
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();
@@ -285,9 +275,6 @@ test('upload a torrent does not create a notification for followers when followi
$bot = Bot::factory()->create([
'command' => 'Systembot',
]);
$chat = Chatroom::factory()->create([
'name' => config('chat.system_chatroom'),
]);
Notification::fake();