<?php

use App\Domains\Ai\Actions\GenerateSlug;
use App\Domains\Ai\Services\AiService;

it('generates slug from URL via AI service', function () {
    $mockAi = Mockery::mock(AiService::class);
    $mockAi->shouldReceive('complete')
        ->once()
        ->andReturn('best-promo');

    $action = new GenerateSlug($mockAi);
    $slug = $action->handle('https://example.com/summer-sale-2026');

    expect($slug)->toBe('best-promo');
});
