commit
6e92ddad15
|
@ -31,14 +31,14 @@ handle remainder => sub {
|
|||
my $stone = $birthstones{$month};
|
||||
return unless $stone;
|
||||
|
||||
return $month . " birthstone: $stone",
|
||||
return "$month birthstone: $stone",
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => $stone,
|
||||
subtitle => 'Birthstone for '.$month
|
||||
subtitle => "Birthstone for $month",
|
||||
},
|
||||
templates => {
|
||||
group => "text",
|
||||
group => 'text',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -9,23 +9,21 @@ use DDG::Test::Goodie;
|
|||
zci answer_type => "birth_stone";
|
||||
zci is_cached => 1;
|
||||
|
||||
sub get_structured_answer {
|
||||
my($month, $birthstone) = @_;
|
||||
return $month . " birthstone: $birthstone",
|
||||
sub build_structured_answer {
|
||||
my ($month, $birthstone) = @_;
|
||||
return "$month birthstone: $birthstone",
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => $birthstone,
|
||||
subtitle => 'Birthstone for '.$month
|
||||
subtitle => "Birthstone for $month",
|
||||
},
|
||||
templates => {
|
||||
group => "text",
|
||||
group => 'text',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub build_test {
|
||||
test_zci(get_structured_answer(@_));
|
||||
}
|
||||
sub build_test { test_zci(build_structured_answer(@_)) }
|
||||
|
||||
ddg_goodie_test(
|
||||
[qw( DDG::Goodie::BirthStone )],
|
||||
|
|
Loading…
Reference in New Issue