Changeset 1273 for trunk/t/54_redirect.t


Ignore:
Timestamp:
Sep 4, 2009, 11:24:51 PM (12 years ago)
Author:
Dominic Hargreaves
Message:

test cleanups for refreshing the test db (thanks bob) (fixes #271)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/54_redirect.t

    r1064 r1273  
    33use OpenGuides::Config;
    44use OpenGuides;
     5use OpenGuides::Test;
    56use Test::More;
    67
     
    1415plan tests => 2;
    1516
    16 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
    1717my $config = OpenGuides::Config->new(
    1818       vars => {
     
    2929if ( $@ ) { $config->use_plucene ( 0 ) };
    3030       
     31    OpenGuides::Test::refresh_db();
     32
    3133my $guide = OpenGuides->new( config => $config );
    3234my $wiki = $guide->wiki;
    3335
    34 # Clear out the database from any previous runs.
    35 foreach my $del_node ( $wiki->list_all_nodes ) {
    36     $wiki->delete_node( $del_node ) or die "Can't delete $del_node";
    37 }
    3836
    3937$wiki->write_node( "Test Page", "#REDIRECT [[Test Page 2]]" )
Note: See TracChangeset for help on using the changeset viewer.