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

Last change on this file since 812 was 812, checked in by nick, 15 years ago

Update the test for the new microformat templates

File size: 1.1 KB
RevLine 
[785]1use Wiki::Toolkit::Setup::SQLite;
[782]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
[785]13    Wiki::Toolkit::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
14    Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
[782]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                                     );
[812]24    like( $output, qr#Website:</span> <span class="url"><a href="http://www.example.com/">http://www.example.com/</a>#, "website correctly displayed" );
[782]25}
26
Note: See TracBrowser for help on using the repository browser.