Author: dom Date: 2012-12-18 18:15:56 +0000 (Tue, 18 Dec 2012) New Revision: 1447
Modified: trunk/Changes trunk/t/701_missing_metadata.t trunk/t/906_show_index_form.t trunk/templates/header.tt trunk/templates/preferences.tt Log: Fix several test failures triggered by the stricter Test::HTML::Content (et al) found in current Debian unstable.
Modified: trunk/Changes =================================================================== --- trunk/Changes 2012-09-01 09:31:03 UTC (rev 1446) +++ trunk/Changes 2012-12-18 18:15:56 UTC (rev 1447) @@ -5,6 +5,8 @@
0.71 ? Added scale to category/locale index maps. + Fix several test failures triggered by the stricter + Test::HTML::Content (et al) found in current Debian unstable.
0.70 26 August 2012 New elements allowed in page content: span, dl, dt, dd (fixes #303).
Modified: trunk/t/701_missing_metadata.t =================================================================== --- trunk/t/701_missing_metadata.t 2012-09-01 09:31:03 UTC (rev 1446) +++ trunk/t/701_missing_metadata.t 2012-12-18 18:15:56 UTC (rev 1447) @@ -122,7 +122,8 @@
# Test the normal, HTML version my $output = eval { - $guide->show_missing_metadata( return_output=>1 ); + $guide->show_missing_metadata( return_output=>1, + noheaders => 1); }; is( $@, "", "->show_missing_metadata doesn't die when called with no metadata_type" ); @@ -134,7 +135,8 @@
$output = eval { $guide->show_missing_metadata( return_output => 1, - metadata_type => "latitude" ); + metadata_type => "latitude", + noheaders => 1); }; is( $@, "", "->show_missing_metadata doesn't die when called with " . "metadata_type 'latitude'" );
Modified: trunk/t/906_show_index_form.t =================================================================== --- trunk/t/906_show_index_form.t 2012-09-01 09:31:03 UTC (rev 1446) +++ trunk/t/906_show_index_form.t 2012-12-18 18:15:56 UTC (rev 1447) @@ -35,7 +35,7 @@ OpenGuides::CGI->make_index_form_dropdowns( guide => $guide ); }; ok( !$@, "->make_index_form_dropdowns doesn't die when no criteria supplied" ); -my $html = join( " ", ( map { $_->{html} } @dropdowns ) ); +my $html = '<html>' . join( " ", ( map { $_->{html} } @dropdowns ) ) . '</html>'; Test::HTML::Content::tag_ok( $html, "select", { name => "cat" }, "...and we have a 'cat' select" ); like( $html, qr/apples.*bananas.*cherries/is, @@ -63,7 +63,7 @@ ); }; ok( !$@, "->make_index_form_dropdowns doesn't die when category supplied" ); -$html = join( " ", ( map { $_->{html} } @dropdowns ) ); +$html = '<html>' . join( " ", ( map { $_->{html} } @dropdowns ) ) . '</html>'; Test::HTML::Content::tag_ok( $html, "select", { name => "cat" }, "...and we have a 'cat' select" ); like( $html, qr/apples.*bananas.*cherries/is, @@ -97,7 +97,7 @@ ); }; ok( !$@, "->make_index_form_dropdowns doesn't die when locale supplied" ); -$html = join( " ", ( map { $_->{html} } @dropdowns ) ); +$html = '<html>' . join( " ", ( map { $_->{html} } @dropdowns ) ). '</html>'; Test::HTML::Content::tag_ok( $html, "select", { name => "cat" }, "...and we have a 'cat' select" ); like( $html, qr/apples.*bananas.*cherries/is, @@ -135,7 +135,7 @@ }; ok( !$@, "->make_index_form_dropdowns doesn't die when locale and categorysupplied" ); -$html = join( " ", ( map { $_->{html} } @dropdowns ) ); +$html = '<html>' . join( " ", ( map { $_->{html} } @dropdowns ) ). '</html>'; Test::HTML::Content::tag_ok( $html, "select", { name => "cat" }, "...and we have a 'cat' select" ); like( $html, qr/apples.*bananas.*cherries/is,
Modified: trunk/templates/header.tt =================================================================== --- trunk/templates/header.tt 2012-09-01 09:31:03 UTC (rev 1446) +++ trunk/templates/header.tt 2012-12-18 18:15:56 UTC (rev 1447) @@ -71,7 +71,7 @@ [% END %] [% UNLESS not_editable %] <link rel="alternate" type="application/wiki" title="Edit this page!" - href="[% source_site or full_cgi_url %]?id=[% node_param %];action=edit"> + href="[% source_site or full_cgi_url %]?id=[% node_param %];action=edit" /> [% END %]
[% IF display_google_maps %]
Modified: trunk/templates/preferences.tt =================================================================== --- trunk/templates/preferences.tt 2012-09-01 09:31:03 UTC (rev 1446) +++ trunk/templates/preferences.tt 2012-12-18 18:15:56 UTC (rev 1447) @@ -14,7 +14,7 @@
<p> [% IF prefs.preview_above_edit_box %] - <input type="checkbox" id="preview_above" name="preview_above_edit_box" value="1" checked /> + <input type="checkbox" id="preview_above" name="preview_above_edit_box" value="1" checked="1" /> [% ELSE %] <input type="checkbox" id="preview_above" name="preview_above_edit_box" value="1" /> [% END %] @@ -23,7 +23,7 @@
<p> [% IF prefs.include_geocache_link %] - <input type="checkbox" id="geocache" name="include_geocache_link" value="1" checked /> + <input type="checkbox" id="geocache" name="include_geocache_link" value="1" checked="1" /> [% ELSE %] <input type="checkbox" id="geocache" name="include_geocache_link" value="1" /> [% END %] @@ -32,7 +32,7 @@
<p> [% IF prefs.latlong_traditional %] - <input type="checkbox" id="latlong" name="latlong_traditional" value="1" checked /> + <input type="checkbox" id="latlong" name="latlong_traditional" value="1" checked="1" /> [% ELSE %] <input type="checkbox" id="latlong" name="latlong_traditional" value="1" /> [% END %] @@ -41,7 +41,7 @@
<p> [% IF prefs.omit_help_links %] - <input type="checkbox" id="omit_help" name="omit_help_links" value="1" checked /> + <input type="checkbox" id="omit_help" name="omit_help_links" value="1" checked="1" /> [% ELSE %] <input type="checkbox" id="omit_help" name="omit_help_links" value="1" /> [% END %] @@ -50,7 +50,7 @@
<p> [% IF prefs.show_minor_edits_in_rc %] - <input type="checkbox" id="show_minor" name="show_minor_edits_in_rc" value="1" checked /> + <input type="checkbox" id="show_minor" name="show_minor_edits_in_rc" value="1" checked="1" /> [% ELSE %] <input type="checkbox" id="show_minor" name="show_minor_edits_in_rc" value="1" /> [% END %] @@ -59,7 +59,7 @@
<p> [% IF prefs.is_admin %] - <input type="checkbox" id="is_admin" name="is_admin" value="1" checked /> + <input type="checkbox" id="is_admin" name="is_admin" value="1" checked="1" /> [% ELSE %] <input type="checkbox" id="is_admin" name="is_admin" value="1" /> [% END %] @@ -120,7 +120,7 @@ </p>
<input type="submit" value="Set it" class="form_button" /> - <input type="hidden" name="action" value="set_preferences"> + <input type="hidden" name="action" value="set_preferences" /> [% IF return_to_url %] <input type="hidden" name="return_to_url" value="[% return_to_url | html %]" />