Skip to content

Commit

Permalink
Merge pull request #62 from perldoc-jp/improve-test
Browse files Browse the repository at this point in the history
関数一覧と変数一覧で、リンク切れしていないかテストする
  • Loading branch information
kfly8 authored Jan 4, 2024
2 parents e9f5cc2 + 95e4e87 commit 7fcfe73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/endpoints.t
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,18 @@ subtest 'GET /index/function' => sub {
$mech->get('/index/function');
is $mech->status, 200, 'status is 200';
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' );
};

subtest 'GET /index/variable' => sub {
$mech->get('/index/variable');
is $mech->status, 200, 'status is 200';
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' );
};

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

0 comments on commit 7fcfe73

Please sign in to comment.