Skip to content
Permalink
Browse files

Add a test to check what the login method returns in the normal case,…

… with no login messages.
  • Loading branch information...
perlDreamer committed Nov 13, 2009
1 parent bc21f90 commit 6c6270346eabfc5226013c4400b273a015191f01
Showing with 3 additions and 1 deletion.
  1. +3 −1 t/Auth.t
@@ -33,7 +33,7 @@ my ($request, $oldRequest, $output);
#----------------------------------------------------------------------------
# Tests

plan tests => 2; # Increment this number for each test you create
plan tests => 3; # Increment this number for each test you create

#----------------------------------------------------------------------------
# Test createAccountSave and returnUrl together
@@ -71,12 +71,14 @@ $session->{_request} = $request;
$auth = WebGUI::Auth->new( $session, $AUTH_METHOD, 3 );
my $username = $session->id->generate;
push @cleanupUsernames, $username;
$session->setting->set('showMessageOnLogin', 0);
$output = $auth->login;

is(
$session->http->getRedirectLocation, 'REDIRECT_LOGIN_URL',
"returnUrl field is used to set redirect after login",
);
is $output, undef, 'login returns undef when showMessageOnLogin is false';

# Session Cleanup
$session->{_request} = $oldRequest;

0 comments on commit 6c62703

Please sign in to comment.
You can’t perform that action at this time.