Zapp Brannigan: Convert to full template (#2994)
* Change to full template, add handlebars file for new line in quote. * Change data to -ANY- in test file. * Replace regex with re().master
parent
fcc5983d0c
commit
16f3fd4599
|
@ -22,9 +22,17 @@ handle query => sub {
|
|||
|
||||
return join("\n", @quote),
|
||||
structured_answer => {
|
||||
input => [],
|
||||
operation => 'Zapp Brannigan quote',
|
||||
result => join('<br>', @quote)};
|
||||
data => {
|
||||
content => join("<br>", @quote),
|
||||
subtitle => 'Zapp Brannigan quote'
|
||||
},
|
||||
templates => {
|
||||
group => "text",
|
||||
options => {
|
||||
content => 'DDH.zapp_brannigan.content'
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
1;
|
||||
1;
|
|
@ -0,0 +1 @@
|
|||
<h3 class="c-base__title">{{{content}}}</h3>
|
|
@ -3,6 +3,7 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use Test::More;
|
||||
use Test::Deep;
|
||||
use DDG::Test::Goodie;
|
||||
|
||||
zci answer_type => 'zapp_brannigan';
|
||||
|
@ -10,14 +11,21 @@ zci is_cached => 0;
|
|||
|
||||
ddg_goodie_test(
|
||||
[qw( DDG::Goodie::ZappBrannigan )],
|
||||
'zapp brannigan quote' => test_zci(
|
||||
qr/Zapp Brannigan: /,
|
||||
'zapp brannigan quote' => test_zci(
|
||||
re('Zapp Brannigan: '),
|
||||
structured_answer => {
|
||||
input => [],
|
||||
operation => 'Zapp Brannigan quote',
|
||||
result => qr/Zapp Brannigan: /,
|
||||
},
|
||||
data => {
|
||||
subtitle => 'Zapp Brannigan quote',
|
||||
content => re('Zapp Brannigan: ')
|
||||
},
|
||||
templates => {
|
||||
group => "text",
|
||||
options => {
|
||||
content => 'DDH.zapp_brannigan.content'
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
done_testing;
|
||||
done_testing;
|
Loading…
Reference in New Issue