Files
portal/app/tests/Unit/Advertising/BannerUploadPolicyTest.php
T

18 lines
487 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
use App\Services\Advertising\BannerUploadPolicy;
it('allows banners up to the yandex limit of 512 kb', function () {
expect(BannerUploadPolicy::MAX_BYTES)->toBe(512000);
});
it('formats the limit for humans in kilobytes', function () {
expect(BannerUploadPolicy::humanMaxSize())->toBe('500 КБ');
});
it('accepts the image formats yandex takes', function () {
expect(BannerUploadPolicy::FORMATS)->toBe(['jpg', 'jpeg', 'png', 'gif']);
});