source: trunk/t/63_bug_map_link_no_address.t @ 949

Last change on this file since 949 was 949, checked in by Earle Martin, 15 years ago

Use skip_all for tests relying entirely on SQLite, instead of issuing skip commands with duplicate test counts and causing maintenance overhead.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.0 KB
RevLine 
[785]1use Wiki::Toolkit::Setup::SQLite;
[366]2use OpenGuides;
[565]3use OpenGuides::Test;
[949]4use Test::More;
[366]5
6eval { require DBD::SQLite; };
7
[949]8if ($@) {
9    plan skip_all => "DBD::SQLite not installed - no database to test with";
10} else {
11    plan tests => 1;
12}
13
[366]14SKIP: {
[785]15    Wiki::Toolkit::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
16    Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
[565]17    my $config = OpenGuides::Test->make_basic_config;
[366]18    my $guide = OpenGuides->new( config => $config );
19
[450]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";
[366]21
22    my $output = $guide->display_node(
23                                       id => "South Croydon Station",
24                                       return_output => 1,
25                                     );
[651]26    like( $output, qr/Map of this place/, "map link included when no address" );
[366]27}
28
Note: See TracBrowser for help on using the repository browser.