zeroclickinfo-goodies/t/Unicornify.t

25 lines
801 B
Perl
Raw Normal View History

2012-09-06 15:34:16 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
use Unicornify::URL;
zci answer_type => 'unicornify';
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::Unicornify
)],
2014-10-28 11:36:15 -07:00
'unicornify example@example.com' =>
2012-09-09 23:56:39 -07:00
test_zci('This is a unique unicorn for example@example.com:' . "\n" . 'Learn more at unicornify.appspot.com',
2014-10-28 11:36:15 -07:00
heading => 'example@example.com (Unicornify)',
2012-09-09 23:56:39 -07:00
html => 'This is a unique unicorn for example@example.com:'
.'<br /><a href="'.unicornify_url(email => 'example@example.com', size => 128).'">'
2014-08-30 11:58:43 -07:00
.'<img src="/iu/?u='.unicornify_url(email=>'example@example.com', size => 100).'" class="zci--unicornify-img" /></a>'
2012-09-10 01:14:42 -07:00
. 'Learn more at <a href="http://unicornify.appspot.com/">unicornify.appspot.com</a>'));
2012-09-06 15:34:16 -07:00
done_testing;