create(); $user = User::factory()->create(['tenant_id' => $tenant->id]); $service = app(NotificationService::class); $service->notifyInApp($user, 'reminder', 'Срок касания', 'Перезвонить клиенту через 30 мин', ['deal_id' => 42]); $notif = InAppNotification::query()->first(); expect($notif)->not->toBeNull(); expect($notif->event)->toBe('reminder'); expect($notif->title)->toBe('Срок касания'); expect($notif->body)->toBe('Перезвонить клиенту через 30 мин'); expect($notif->deal_id)->toBe(42); expect($notif->payload['deal_id'])->toBe(42); });