Skip to content

Commit

Permalink
Make /recent xpath test slightly more reliable
Browse files Browse the repository at this point in the history
and tidy.
  • Loading branch information
rwstauner committed Aug 6, 2014
1 parent 03230a4 commit 3c87a8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/controller/recent.t
Expand Up @@ -5,13 +5,14 @@ use MetaCPAN::Web::Test;

test_psgi app, sub {
my $cb = shift;
ok( my $res = $cb->( GET "/recent" ), 'GET /recent' );
ok( my $res = $cb->( GET '/recent' ), 'GET /recent' );
is( $res->code, 200, 'code 200' );

my $tx = tx($res);
ok(
my $release = $tx->find_value(
'//table[2]/tbody/tr[1]/td[@class="name"]//a[1]/@href'),
'//table[contains(@class, "table-releases")][1]/tbody/tr[1]/td[@class="name"]//a[1]/@href'
),
'contains a release'
);
ok( $res = $cb->( GET $release ), "GET $release" );
Expand Down

0 comments on commit 3c87a8b

Please sign in to comment.