MoonPhases: Adding subtitle and cleaning up tests a little

master
Rob Emery 2016-05-17 20:33:57 +01:00
parent ce8804804e
commit 39af74d685
2 changed files with 3 additions and 2 deletions

View File

@ -58,6 +58,7 @@ handle query_lc => sub {
return "The current lunar phase is: $phase", structured_answer => {
data => {
title => $phase,
subtitle => 'Current lunar phase'
},
templates => {
group => 'text'

View File

@ -16,13 +16,13 @@ my $named = qr/(?:New|Full)$space_plus(?:Moon)/;
my $phases = qr/$wax_wane|$quarter|$named/;
my $ascii_answer = re(qr/^The current lunar phase is: $phases$/);
my $html_answer = re(qr%^The current lunar phase is: <a href="\?q=$phases">$phases</a>$%);
sub build_test
{
return test_zci($ascii_answer, structured_answer => {
data => {
title => re($phases)
title => re($phases),
subtitle => 'Current lunar phase'
},
templates => {
group => 'text'