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

Last change on this file since 785 was 785, checked in by Dominic Hargreaves, 15 years ago

Use Wiki::Toolkit. Note that CGI::Wiki::Plugin::Diff hasn't been converted yet,
so tests will be broken for now.

  • 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 tests => 1;
5
6eval { require DBD::SQLite; };
7my $have_sqlite = $@ ? 0 : 1;
8
9SKIP: {
10    skip "DBD::SQLite not installed - no database to test with", 1
11      unless $have_sqlite;
12
13    Wiki::Toolkit::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
14    Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
15    my $config = OpenGuides::Test->make_basic_config;
16    my $guide = OpenGuides->new( config => $config );
17
18    $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";
19
20    my $output = $guide->display_node(
21                                       id => "South Croydon Station",
22                                       return_output => 1,
23                                     );
24    like( $output, qr/Map of this place/, "map link included when no address" );
25}
26
Note: See TracBrowser for help on using the repository browser.