source: trunk/t/68_bug_website_displayed.t @ 782

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

Fix bug and release 0.54 (fixes #112)

File size: 1.0 KB
Line 
1use CGI::Wiki::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    CGI::Wiki::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
14    CGI::Wiki::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, { website => "http://www.example.com/" } ) 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#Website:</span> <a href="http://www.example.com/">http://www.example.com/</a>#, "website correctly displayed" );
25}
26
Note: See TracBrowser for help on using the repository browser.