source: trunk/t/68_bug_website_displayed.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.

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, { website => "http://www.example.com/" } ) 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#Website:</span> <span class="url"><a href="http://www.example.com/">http://www.example.com/</a>#, "website correctly displayed" );
27
Note: See TracBrowser for help on using the repository browser.