Ignore:
Timestamp:
Apr 2, 2012, 9:35:16 AM (10 years ago)
Author:
kake
Message:

Fixed bug where missing metadata search was picking up redirect pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/71_missing_metadata.t

    r1273 r1317  
    2525
    2626
    27 # Add 3 different pages, one of which with two versions
     27# Add four different pages, one of which with two versions, one of which
     28# a redirect.  The redirect should not show up on any "missing metadata"
     29# searches, regardless of the condition of the page it points to.
    2830$wiki->write_node( "Test Page", "foo", undef,
    2931                   { category => "Alpha", lat=>"" } )
     
    4547                   { category => "Locales", lat=>"8.88" } )
    4648  or die "Couldn't write locale for the 2nd time";
    47 
     49OpenGuides::Test->write_data(
     50                              guide => $guide,
     51                              node  => "Redirect Test",
     52                              content => "#REDIRECT [[Test Page]]",
     53                              return_output => 1,
     54                            );
    4855
    4956# Try without search parameters
     
    113120    $guide->show_missing_metadata( return_output=>1 );
    114121};
    115 is( $@, "", "->how_missing_metadata doesn't die" );
     122is( $@, "", "->show_missing_metadata doesn't die" );
    116123
    117124like( $output, qr|Missing Metadata|, "Right page" );
     
    122129    $guide->show_missing_metadata( return_output=>1, metadata_type=>'lat' );
    123130};
    124 is( $@, "", "->how_missing_metadata doesn't die" );
     131is( $@, "", "->show_missing_metadata doesn't die" );
    125132like( $output, qr|<h3>Pages</h3>|, "searched" );
    126133like( $output, qr|Test Page|, "had node" );
Note: See TracChangeset for help on using the changeset viewer.