App-BlurFill
view release on metacpan or search on metacpan
like($res->content, qr/<!DOCTYPE html>/i, 'Response contains HTML doctype');
like($res->content, qr/<title>BlurFill - Result/i, 'Response contains result page title');
like($res->content, qr/Your resized image is ready!/i, 'Response contains success message');
like($res->content, qr/<img[^>]+src="\/download\//i, 'Response contains image preview');
like($res->content, qr/<a[^>]+href="\/download\//i, 'Response contains download link');
like($res->content, qr/<a[^>]+href="\/"[^>]*>Create Another/i, 'Response contains link back to home');
};
# Test GET /download/:filename route
# Note: This test assumes a file exists in the temp directory from the previous POST test
# In practice, we'd need to ensure a file exists, but for this test we'll just verify the route exists
test_psgi
app => $app,
client => sub {
my $cb = shift;
my $res = $cb->(GET '/download/nonexistent_file.jpg');
is($res->code, 404, 'Got 404 for non-existent file');
};
done_testing;
( run in 3.829 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )