X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fapp-mech-rootpage.t;h=cc6f71fb9540b570c85cf0adfba68174b8e080fe;hb=ce2bd1e07847124f2e768c9391163c4e02cf3969;hp=89143b49b8a54f0946a7a473853cad25ecfe6ade;hpb=1aa53942b7e4aa472f84aabed190f517213d6704;p=catagits%2FGitalist.git diff --git a/t/app-mech-rootpage.t b/t/app-mech-rootpage.t index 89143b4..cc6f71f 100644 --- a/t/app-mech-rootpage.t +++ b/t/app-mech-rootpage.t @@ -2,7 +2,7 @@ use FindBin qw/$Bin/; use lib "$Bin/lib"; use TestGitalist; -plan 'skip_all' => 'Either Test::WWW::Mechanize::Catalyst or WWW::Mechanize::TreeBuilder not present' unless MECH(); +plan 'skip_all' => "One or more of the following modules aren't present: Test::WWW::Mechanize::Catalyst WWW::Mechanize::TreeBuilder HTML::TreeBuilder::XPath" unless MECH(); MECH->get_ok('/'); { @@ -11,7 +11,7 @@ MECH->get_ok('/'); my $uri = $row->findnodes('.//a')->[0]->attr('href'); my ($repos_name) = $uri =~ m{^http://localhost/([\w\.]+)$}; ok $repos_name, "Repos name $repos_name"; - like $row->findnodes('.//a')->[1]->as_text, qr/^[\w\s;'\.]+$/, 'Have description' + like $row->findnodes('.//a')->[1]->as_text, qr{^[\w\s/;',\.]+$}, 'Have description' unless $repos_name eq 'nodescription'; like $row->findnodes('.//td[@class="time-since"')->[0]->as_text, qr/^(never|\d\s+(years|months)\s+ago)$/, 'Last change looks ok';