Skip Menu |

This queue is for tickets about the Catalyst-Authentication-Credential-Authen-Simple CPAN distribution.

Report information
The Basics
Id: 50672
Status: resolved
Priority: 0/
Queue: Catalyst-Authentication-Credential-Authen-Simple

People
Owner: jlmartinez [...] capside.com
Requestors: jlmartinez [...] capside.com
Cc: inigo.tejedor [...] gmail.com
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: (no value)



CC: inigo.tejedor [...] gmail.com
Subject: Test suite fails due to actions in application class
It seems that the test suite won't pass because the application class has actions. t/003_apptest.t .. [warn] Action methods (authed_ok, authed_ko) found defined in your application class, AuthTestApp3. This is deprecated, please move them into a Root controller. t/003_apptest.t .. ok t/004_logtest.t .. 1/? # Failed test 'got correct log info' # at t/lib/TestLogger.pm line 29. # got: 'Action methods (authed_ok) found defined in your application class, AuthTestApp4. This is deprecated, please move them into a Root controller.' # expected: 'just calling' # Looks like you planned 8 tests but ran 10. # Looks like you failed 1 test of 10 run.
On Mar. Oct. 20 14:14:33 2009, BOBTFISH wrote: Show quoted text
> http://search.cpan.org/~flora/Catalyst-Runtime- > 5.80013/lib/Catalyst/Upgrading.pod#Actions_in_your_application_class >
thanks: inigo@crono:~ $ diff -Naur /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/ diff -Naur /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp2/Controller/Root.pm /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp2/Controller/Root.pm --- /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp2/Controller/Root.pm 1970-01-01 01:00:00.000000000 +0100 +++ /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp2/Controller/Root.pm 2009-10-20 20:58:47.000000000 +0200 @@ -0,0 +1,51 @@ +package AuthTestApp2::Controller::Root; + +use strict; +use warnings; + +use Test::More; +use Test::Exception; + +use parent 'Catalyst::Controller'; + +__PACKAGE__->config(namespace => ''); + +sub authed_ok : Local { + my ( $self, $c ) = @_; + + ok(!$c->user, "no user"); + my $authd = $c->authenticate( { "username" => $c->request->param('username'), + "password" => $c->request->param('password') }); + ok($authd, "logged in"); + ok(defined($c->user->get('name')), "user object is ok"); + + if ($authd){ + $c->response->body( "authed " . $c->user->get('name') ); + } else { + $c->response->body( "not authed" ); + } + + $c->logout; + ok(!$c->user, "no user"); +} + +sub authed_ko : Local { + my ( $self, $c ) = @_; + + ok(!$c->user, "no user"); + my $authd = $c->authenticate( { "username" => $c->request->param('username'), + "password" => $c->request->param('password') }); + ok(not($authd), "not logged in"); + ok(!$c->user, "user object not present"); + + if ($authd){ + $c->response->body( "authed" ); + } else { + $c->response->body( "not authed" ); + } + + $c->logout; + ok(!$c->user, "no user"); +} + +1; diff -Naur /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp2.pm /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp2.pm --- /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp2.pm 2008-06-28 16:17:37.000000000 +0200 +++ /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp2.pm 2009-10-20 20:58:49.000000000 +0200 @@ -2,48 +2,6 @@ use Catalyst qw/Authentication/; -use Test::More; -use Test::Exception; - -sub authed_ok : Local { - my ( $self, $c ) = @_; - - ok(!$c->user, "no user"); - my $authd = $c->authenticate( { "username" => $c->request->param('username'), - "password" => $c->request->param('password') }); - ok($authd, "logged in"); - ok(defined($c->user->get('name')), "user object is ok"); - - if ($authd){ - $c->response->body( "authed " . $c->user->get('name') ); - } else { - $c->response->body( "not authed" ); - } - - $c->logout; - ok(!$c->user, "no user"); -} - - -sub authed_ko : Local { - my ( $self, $c ) = @_; - - ok(!$c->user, "no user"); - my $authd = $c->authenticate( { "username" => $c->request->param('username'), - "password" => $c->request->param('password') }); - ok(not($authd), "not logged in"); - ok(!$c->user, "user object not present"); - - if ($authd){ - $c->response->body( "authed" ); - } else { - $c->response->body( "not authed" ); - } - - $c->logout; - ok(!$c->user, "no user"); -} - __PACKAGE__->config->{'Plugin::Authentication'} = { 'realms' => { 'default' => { diff -Naur /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp3/Controller/Root.pm /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp3/Controller/Root.pm --- /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp3/Controller/Root.pm 1970-01-01 01:00:00.000000000 +0100 +++ /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp3/Controller/Root.pm 2009-10-20 20:58:00.000000000 +0200 @@ -0,0 +1,51 @@ +package AuthTestApp3::Controller::Root; + +use strict; +use warnings; + +use Test::More; +use Test::Exception; + +use parent 'Catalyst::Controller'; + +__PACKAGE__->config(namespace => ''); + +sub authed_ko : Local { + my ( $self, $c ) = @_; + + ok(!$c->user, "no user"); + my $authd = $c->authenticate( { "username" => $c->request->param('username'), + "password" => $c->request->param('password') }); + ok(not($authd), "not logged in"); + ok(!$c->user, "user object not present"); + + if ($authd){ + $c->response->body( "authed" ); + } else { + $c->response->body( "not authed" ); + } + + $c->logout; + ok(!$c->user, "no user"); +} + +sub authed_ok : Local { + my ( $self, $c ) = @_; + + ok(!$c->user, "no user"); + my $authd = $c->authenticate( { "username" => $c->request->param('username'), + "password" => $c->request->param('password') }); + ok($authd, "logged in"); + ok(defined($c->user->get('name')), "user object is ok"); + + if ($authd){ + $c->response->body( "authed " . $c->user->get('name') ); + } else { + $c->response->body( "not authed" ); + } + + $c->logout; + ok(!$c->user, "no user"); +} + +1; diff -Naur /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp3.pm /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp3.pm --- /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp3.pm 2008-06-28 16:21:03.000000000 +0200 +++ /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp3.pm 2009-10-20 20:58:04.000000000 +0200 @@ -2,48 +2,6 @@ use Catalyst qw/Authentication/; -use Test::More; -use Test::Exception; - -sub authed_ok : Local { - my ( $self, $c ) = @_; - - ok(!$c->user, "no user"); - my $authd = $c->authenticate( { "username" => $c->request->param('username'), - "password" => $c->request->param('password') }); - ok($authd, "logged in"); - ok(defined($c->user->get('name')), "user object is ok"); - - if ($authd){ - $c->response->body( "authed " . $c->user->get('name') ); - } else { - $c->response->body( "not authed" ); - } - - $c->logout; - ok(!$c->user, "no user"); -} - - -sub authed_ko : Local { - my ( $self, $c ) = @_; - - ok(!$c->user, "no user"); - my $authd = $c->authenticate( { "username" => $c->request->param('username'), - "password" => $c->request->param('password') }); - ok(not($authd), "not logged in"); - ok(!$c->user, "user object not present"); - - if ($authd){ - $c->response->body( "authed" ); - } else { - $c->response->body( "not authed" ); - } - - $c->logout; - ok(!$c->user, "no user"); -} - __PACKAGE__->config->{'Plugin::Authentication'} = { 'realms' => { 'default' => { diff -Naur /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp4/Controller/Root.pm /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp4/Controller/Root.pm --- /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp4/Controller/Root.pm 1970-01-01 01:00:00.000000000 +0100 +++ /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp4/Controller/Root.pm 2009-10-20 20:56:08.000000000 +0200 @@ -0,0 +1,25 @@ +package AuthTestApp4::Controller::Root; + +use strict; +use warnings; + +use parent 'Catalyst::Controller'; + +__PACKAGE__->config(namespace => ''); + +sub authed_ok : Local { + my ( $self, $c ) = @_; + + my $authd = $c->authenticate( { "username" => $c->request->param('username'), + "password" => $c->request->param('password') }); + + if ($authd){ + $c->response->body( "authed " . $c->user->get('name') ); + } else { + $c->response->body( "not authed" ); + } + + $c->logout; +} + +1; diff -Naur /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp4.pm /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp4.pm --- /home/inigo/.cpan/build/Catalyst-Authentication-Credential-Authen-Simple-0.05-GKtGBP/t/lib/AuthTestApp4.pm 2009-04-23 20:10:49.000000000 +0200 +++ /home/inigo/.cpan/build/fix_Catalyst-Authentication-Credential-Authen-Simple-0.05/t/lib/AuthTestApp4.pm 2009-10-20 20:48:41.000000000 +0200 @@ -6,22 +6,6 @@ use Test::More; use Test::Exception; -sub authed_ok : Local { - my ( $self, $c ) = @_; - - my $authd = $c->authenticate( { "username" => $c->request->param('username'), - "password" => $c->request->param('password') }); - - if ($authd){ - $c->response->body( "authed " . $c->user->get('name') ); - } else { - $c->response->body( "not authed" ); - } - - $c->logout; -} - - __PACKAGE__->config->{'Plugin::Authentication'} = { 'realms' => { 'default' => {
Getting PASSES in CPAN Testers