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

File size: 1.1 KB
RevLine 
[785]1use Wiki::Toolkit::Setup::SQLite;
[782]2use OpenGuides;
3use OpenGuides::Test;
[949]4use Test::More;
[782]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
[782]14SKIP: {
[785]15    Wiki::Toolkit::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
16    Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
[782]17    my $config = OpenGuides::Test->make_basic_config;
18    my $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
22    my $output = $guide->display_node(
23                                       id => "South Croydon Station",
24                                       return_output => 1,
25                                     );
[812]26    like( $output, qr#Website:</span> <span class="url"><a href="http://www.example.com/">http://www.example.com/</a>#, "website correctly displayed" );
[782]27}
28
Note: See TracBrowser for help on using the repository browser.