|
Revision 785, 1.0 kB
(checked in by dom, 3 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
|
| Line | |
|---|
| 1 | use Wiki::Toolkit::Setup::SQLite; |
|---|
| 2 | use OpenGuides; |
|---|
| 3 | use OpenGuides::Test; |
|---|
| 4 | use Test::More tests => 1; |
|---|
| 5 | |
|---|
| 6 | eval { require DBD::SQLite; }; |
|---|
| 7 | my $have_sqlite = $@ ? 0 : 1; |
|---|
| 8 | |
|---|
| 9 | SKIP: { |
|---|
| 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 | } |
|---|