From 3c6ad74cae0557a247e2a6857aa5eca814d625c4 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Sun, 27 Apr 2008 10:07:35 +0000 Subject: [PATCH] fixed the rest of the Test::WWW::Mech tests --- t/Asset/Wobject/GalleryAlbum/edit.t | 1 - t/Asset/Wobject/GalleryAlbum/rss.t | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/t/Asset/Wobject/GalleryAlbum/edit.t b/t/Asset/Wobject/GalleryAlbum/edit.t index d01f454bb..afa259421 100644 --- a/t/Asset/Wobject/GalleryAlbum/edit.t +++ b/t/Asset/Wobject/GalleryAlbum/edit.t @@ -20,7 +20,6 @@ use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; use Test::Deep; -use Test::WWW::Mechanize; #---------------------------------------------------------------------------- # Init diff --git a/t/Asset/Wobject/GalleryAlbum/rss.t b/t/Asset/Wobject/GalleryAlbum/rss.t index cf5a97217..4fe0e1653 100644 --- a/t/Asset/Wobject/GalleryAlbum/rss.t +++ b/t/Asset/Wobject/GalleryAlbum/rss.t @@ -65,12 +65,22 @@ for my $i ( 0 .. 5 ) { $versionTag->commit; +my ( $mech ); + #---------------------------------------------------------------------------- # Tests + +if ( !eval { require Test::WWW::Mechanize; 1; } ) { + plan skip_all => 'Cannot load Test::WWW::Mechanize. Will not test.'; +} +$mech = Test::WWW::Mechanize->new; +$mech->get( $baseUrl ); +if ( !$mech->success ) { + plan skip_all => "Cannot load URL '$baseUrl'. Will not test."; +} + plan tests => 2; -use_ok("Test::WWW::Mechanize"); -my $mech; #---------------------------------------------------------------------------- # Test www_viewRss