the browser-facing portion of osu!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

the thing the test was testing doesn't exist anymore

bakaneko fdf8fcdd 798f3f97

+1 -22
+1
app/Libraries/Chat/MessageTask.php
··· 21 21 22 22 public static function dispatch(Message $message) 23 23 { 24 + // TODO: how to test Octane tasks? 24 25 DB::afterCommit(fn () => Octane::tasks()->dispatch([new static($message)])); 25 26 } 26 27
-22
tests/Models/Chat/ChannelTest.php
··· 190 190 Event::assertNotDispatched(ChatChannelEvent::class); 191 191 } 192 192 193 - public function testHiddenChannelReceiveMessage() 194 - { 195 - Event::fake(); 196 - 197 - $user = User::factory()->withGroup('announce')->create(); 198 - $otherUsers = User::factory()->count(2)->create(); 199 - $channel = $this->createChannel([$user, ...$otherUsers], 'announce'); 200 - $channel->userChannels()->whereIn('user_id', $otherUsers->pluck('user_id'))->update(['hidden' => true]); 201 - 202 - // Don't care about the ones from createChannel. 203 - app(BroadcastsPendingForTests::class)->reset(); 204 - 205 - $channel->receiveMessage($user, 'test'); 206 - 207 - $broadcastsPending = app(BroadcastsPendingForTests::class)->dispatched( 208 - ChatChannelEvent::class, 209 - fn (ChatChannelEvent $event) => $event->action === 'join' && $otherUsers->find($event->user) 210 - ); 211 - $this->assertSame($otherUsers->count(), count($broadcastsPending)); 212 - Event::assertNotDispatched(ChatChannelEvent::class); 213 - } 214 - 215 193 public function testPmChannelIcon() 216 194 { 217 195 Storage::fake('local-avatar');