zeroclickinfo-goodies/t/HelpLine.t

34 lines
576 B
Perl
Raw Normal View History

2013-06-21 13:35:10 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
use DDG::Test::Location;
use DDG::Request;
2013-06-21 13:35:10 -07:00
zci answer_type => 'helpline';
my @queries = (
'suicide'
);
my @locations = (
'us',
);
2013-06-21 13:35:10 -07:00
ddg_goodie_test(
[qw(
DDG::Goodie::HelpLine
)],
map {(
DDG::Request->new(
query_raw => "$queries[$_]",
2013-06-21 14:20:03 -07:00
location => test_location("$locations[$_]")
),
test_zci(qr/24 Hour Suicide Hotline: [\d\-){7}]/),
)} 0 .. scalar @queries - 1
2013-06-21 13:35:10 -07:00
);
done_testing(scalar @queries * scalar @locations * 2);