Ignore:
Timestamp:
Mar 20, 2007, 4:47:05 PM (15 years ago)
Author:
Earle Martin
Message:

Complete transition to using skip_all (remove old SKIP blocks).
More verbose reporting for error "require"ing DBD::SQLite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/63_bug_map_link_no_address.t

    r949 r956  
    66eval { require DBD::SQLite; };
    77
    8 if ($@) {
    9     plan skip_all => "DBD::SQLite not installed - no database to test with";
    10 } else {
    11     plan tests => 1;
     8if ( $@ ) {
     9    my ($error) = $@ =~ /^(.*?)\n/;
     10    plan skip_all => "DBD::SQLite could not be used - no database to test with ($error)";
    1211}
    1312
    14 SKIP: {
    15     Wiki::Toolkit::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
    16     Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
    17     my $config = OpenGuides::Test->make_basic_config;
    18     my $guide = OpenGuides->new( config => $config );
     13plan tests => 1;
    1914
    20     $guide->wiki->write_node( "South Croydon Station", "A sleepy main-line station in what is arguably the nicest part of Croydon.", undef, { map_link => "http://www.streetmap.co.uk/newmap.srf?x=532804&y=164398&z=1" } ) or die "Couldn't write node";
     15Wiki::Toolkit::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
     16Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
     17my $config = OpenGuides::Test->make_basic_config;
     18my $guide = OpenGuides->new( config => $config );
    2119
    22     my $output = $guide->display_node(
    23                                        id => "South Croydon Station",
    24                                        return_output => 1,
    25                                      );
    26     like( $output, qr/Map of this place/, "map link included when no address" );
    27 }
     20$guide->wiki->write_node( "South Croydon Station", "A sleepy main-line station in what is arguably the nicest part of Croydon.", undef, { map_link => "http://www.streetmap.co.uk/newmap.srf?x=532804&y=164398&z=1" } ) or die "Couldn't write node";
    2821
     22my $output = $guide->display_node(
     23                                   id => "South Croydon Station",
     24                                   return_output => 1,
     25                                 );
     26like( $output, qr/Map of this place/, "map link included when no address" );
     27
Note: See TracChangeset for help on using the changeset viewer.