<?php

declare(strict_types=1);

use App\CreatorsApi\CreatorsApiClient;

test('GetItems ritorna l ASIN richiesto', function () {
    $client = makeCreatorsClient();

    $asin = getenv('TEST_ASIN') ?: 'B0FJ8X2CL4';

    $response = $client->getItems([$asin]);

    $items = $response['itemsResult']['items'] ?? [];

    expect($items)->not()->toBeEmpty();
    expect($items[0]['asin'] ?? null)->toBe($asin);
})->group('integration');
