true]); }); function runLexerForProfileFlag(bool $noAutolink): Status { $user = User::factory()->create(); $user->refresh(); $profile = $user->profile; $profile->no_autolink = $noAutolink; $profile->save(); $status = Status::factory()->create([ 'profile_id' => $profile->id, 'type' => 'photo', 'scope' => 'public', 'visibility' => 'public', 'in_reply_to_id' => null, ]); (new StatusEntityLexer($status))->handle(); return $status; } it('fans out to the home feed when no_autolink is disabled', function () { runLexerForProfileFlag(false); Queue::assertPushed(FeedInsertPipeline::class); }); it('still fans out to the home feed when no_autolink is enabled', function () { runLexerForProfileFlag(true); Queue::assertPushed(FeedInsertPipeline::class); });