Skip to content

Commit

Permalink
Merge pull request #8 from kthakore/master
Browse files Browse the repository at this point in the history
Fixed test cases using depreciated Test::Mojo method
  • Loading branch information
benvanstaveren committed Jul 6, 2013
2 parents 5a929b3 + 48f3ce9 commit b3b1e6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions t/01-functional.t
Expand Up @@ -82,16 +82,16 @@ $t->get_ok('/authonly')->status_is(200)->content_is('not authenticated');
$t->get_ok('/condition/authonly')->status_is(404);

# let's try this
$t->post_form_ok('/login', { u => 'fnark', p => 'fnork' })->status_is(200)->content_is('failed');
$t->post_ok('/login' => form => { u => 'fnark', p => 'fnork' })->status_is(200)->content_is('failed');
$t->get_ok('/authonly')->status_is(200)->content_is('not authenticated');

$t->post_form_ok('/login', { u => 'foo', p => 'bar' })->status_is(200)->content_is('ok');
$t->post_ok('/login' => form => { u => 'foo', p => 'bar' })->status_is(200)->content_is('ok');
$t->get_ok('/authonly')->status_is(200)->content_is('authenticated');
$t->get_ok('/condition/authonly')->status_is(200)->content_is('authenticated condition');

$t->get_ok('/logout')->status_is(200)->content_is('logout');
$t->get_ok('/authonly')->status_is(200)->content_is('not authenticated');

$t->post_form_ok('/login2', { u => 'foo', p => 'bar' })->status_is(200)->content_is('ok');
$t->post_ok('/login2' => form => { u => 'foo', p => 'bar' })->status_is(200)->content_is('ok');
$t->get_ok('/authonly')->status_is(200)->content_is('authenticated');
$t->get_ok('/condition/authonly')->status_is(200)->content_is('authenticated condition');
4 changes: 2 additions & 2 deletions t/02-functional_lazy.t
Expand Up @@ -90,11 +90,11 @@ $t->get_ok('/authonly/lazy')->status_is(200)
$t->get_ok('/condition/authonly/lazy')->status_is(404);

# let's try this
$t->post_form_ok( '/login', { u => 'fnark', p => 'fnork' } )->status_is(200)
$t->post_ok( '/login' => form => { u => 'fnark', p => 'fnork' } )->status_is(200)
->content_is('failed');
$t->get_ok('/authonly')->status_is(200)->content_is('not authenticated');

$t->post_form_ok( '/login', { u => 'foo', p => 'bar' } )->status_is(200)
$t->post_ok( '/login' => form => { u => 'foo', p => 'bar' } )->status_is(200)
->content_is('ok');

# try original auth in lazy mode
Expand Down

0 comments on commit b3b1e6f

Please sign in to comment.