Skip to content

Commit

Permalink
Merge pull request #63 from perldoc-jp/improve-test
Browse files Browse the repository at this point in the history
index/coreもリンク切れがないかテストをする
  • Loading branch information
kfly8 authored Jan 4, 2024
2 parents 7fcfe73 + ce4eb23 commit 8afe022
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions t/endpoints.t
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ subtest 'GET /index/core' => sub {
$mech->get('/index/core');
is $mech->status, 200, 'status is 200';
is $mech->title, 'Perlのコアドキュメントの翻訳一覧 - perldoc.jp';

my @links = $mech->find_all_links( url_regex => qr[/pod/] );
$mech->links_ok( \@links, 'Check all links for core document links' );
};

subtest 'GET /index/function' => sub {
Expand All @@ -66,7 +69,7 @@ subtest 'GET /index/function' => sub {
is $mech->title, 'Perlの組み込み関数の翻訳一覧 - perldoc.jp';

my @links = $mech->find_all_links( url_regex => qr[/func/] );
$mech->links_ok( \@links, 'Check all links for function links' );
$mech->links_ok( \@links, 'Check all links for function document links' );
};

subtest 'GET /index/variable' => sub {
Expand All @@ -75,7 +78,7 @@ subtest 'GET /index/variable' => sub {
is $mech->title, 'Perlの組み込み変数の翻訳一覧 - perldoc.jp';

my @links = $mech->find_all_links( url_regex => qr[/variable/] );
$mech->links_ok( \@links, 'Check all links for variable links' );
$mech->links_ok( \@links, 'Check all links for variable document links' );
};

subtest 'GET /index/module' => sub {
Expand Down

0 comments on commit 8afe022

Please sign in to comment.