Skip to content

Commit

Permalink
test different sections
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 30, 2014
1 parent 7877860 commit 4b6aac3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions t/mojolicious/pod_renderer_lite_app.t
Expand Up @@ -45,31 +45,34 @@ $t->post_ok('/block')->status_is(200)
$t->get_ok('/empty')->status_is(200)->content_is('');

# Perldoc browser (Welcome)
$t->get_ok('/perldoc')->status_is(200)->text_is('h1 a[id="NAME"]', 'NAME')
$t->get_ok('/perldoc')->status_is(200)
->text_is('a[id="TUTORIAL"]', 'TUTORIAL')
->text_is('a[id="GUIDES"]', 'GUIDES')
->content_like(qr/Mojolicious guide to the galaxy/);

# Perldoc browser (Welcome with slash)
$t->get_ok('/perldoc/')->status_is(200)->text_is('h1 a[id="NAME"]', 'NAME')
$t->get_ok('/perldoc/')->status_is(200)
->text_is('a[id="TUTORIAL"]', 'TUTORIAL')
->text_is('a[id="GUIDES"]', 'GUIDES')
->content_like(qr/Mojolicious guide to the galaxy/)
->content_unlike(qr/Pirates/);

# Perldoc browser (Mojo documentation)
$t->get_ok('/perldoc/Mojo')->status_is(200)
->text_is('h1 a[id="NAME"]', 'NAME')->text_is('a[id="handler"]', 'handler')
->text_is('h1 a[id="SYNOPSIS"]', 'SYNOPSIS')
->text_is('a[id="handler"]', 'handler')
->text_like('p', qr/Duct tape for the HTML5 web!/);

# Perldoc browser (Mojo documentation with format)
$t->get_ok('/perldoc/Mojo.html')->status_is(200)
->text_is('h1 a[id="NAME"]', 'NAME')->text_is('a[id="handler"]', 'handler')
->text_is('h1 a[id="SYNOPSIS"]', 'SYNOPSIS')
->text_is('a[id="handler"]', 'handler')
->text_like('p', qr/Duct tape for the HTML5 web!/);

# Perldoc browser (negotiated Mojo documentation)
$t->get_ok('/perldoc/Mojo' => {Accept => 'text/html'})->status_is(200)
->text_is('h1 a[id="NAME"]', 'NAME')->text_is('a[id="handler"]', 'handler')
->text_is('h1 a[id="SYNOPSIS"]', 'SYNOPSIS')
->text_is('a[id="handler"]', 'handler')
->text_like('p', qr/Duct tape for the HTML5 web!/);

# Perldoc browser (Mojo source with format)
Expand Down

0 comments on commit 4b6aac3

Please sign in to comment.