Acme-DreamyImage

 view release on metacpan or  search on metacpan

t/live_save_to_uguu.t  view on Meta::CPAN


use JSON::PP 'encode_json';
use Acme::DreamyImage;

my $output_file = "dreamy_" . int(rand(12345678)) . ".jpg";
my $seed = $output_file . time . $$;

my $img = Acme::DreamyImage->new(seed => $seed, width => 800, height => 450);
$img->write(file => $output_file);
ok -f $output_file, "The output is produced";
ok( (stat($output_file))[7] > 0, "The output size is non-zero." );

if ($ENV{TRAVIS}) {
    my $output_url = `curl --silent -F name=${output_file} -F 'file=\@${output_file}' 'https://www.uguu.se/api.php?d=upload-tool'`;
    diag $output_url;
}

done_testing;



( run in 0.561 second using v1.01-cache-2.11-cpan-49f99fa48dc )