Hi,
If I do:
perl TranzactiiBursiere.pm
it gives the error below.
However, if I access the application in the browser, it works fine.
Couldn't instantiate component TranzactiiBursiere::Model::Db, Can't
locate object method compose_namespace via package Db (perhaps you
forgot to load Db?) at
in test scripts I am able to (for instance) mess with the config my doing
my $config = MyApp-config;
$config-{some_val} = 'test value';
given that I am happy that my Authentication code is well tested in
some other test script, is there a way to somehow bypass it, forcing
calls to
heh ... cheers ... think I've sussed it :
my $ue = 1;
my $username = 'NotAnAdmin';
use Test::MockObject;
my $user = Test::MockObject-new;
$user-mock( 'id',
sub {return $username} );
package MyApp;
sub user {
return $user;
}
sub user_exists {
return $ue;
}
package main;
...
at