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

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

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

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.0 KB
Line 
1use Wiki::Toolkit::Setup::SQLite;
2use OpenGuides;
3use OpenGuides::Test;
4use Test::More;
5
6eval { require DBD::SQLite; };
7
8if ( $@ ) {
9    my ($error) = $@ =~ /^(.*?)\n/;
10    plan skip_all => "DBD::SQLite could not be used - no database to test with ($error)";
11}
12
13plan tests => 1;
14
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 );
19
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";
21
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 TracBrowser for help on using the repository browser.