[Bps-public-commit] r20279 - RT-Authen-ExternalAuth/trunk/t
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Feb 20 08:37:33 EST 2011
Author: sunnavy
Date: Sun Feb 20 08:37:32 2011
New Revision: 20279
Modified:
RT-Authen-ExternalAuth/trunk/t/ldap.t
Log:
test redirect after login
Modified: RT-Authen-ExternalAuth/trunk/t/ldap.t
==============================================================================
--- RT-Authen-ExternalAuth/trunk/t/ldap.t (original)
+++ RT-Authen-ExternalAuth/trunk/t/ldap.t Sun Feb 20 08:37:32 2011
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test tests => 6;
+use RT::Test tests => 9;
use Net::LDAP;
use RT::Authen::ExternalAuth;
@@ -50,15 +50,36 @@
}
);
my ( $baseurl, $m ) = RT::Test->started_ok();
-ok( !$m->login( 'fakeuser', 'password' ), 'not logged in with fake user' );
-ok( $m->login( 'testuser', 'password' ), 'logged in' );
-$m->logout;
-
-$m->get_ok( $baseurl, 'base url' );
-$m->submit_form(
- form_number => 1,
- fields => { user => 'testuser', pass => 'password', },
-);
-$m->text_contains('Logout', 'logged in via form');
+
+
+diag "test uri login";
+{
+ ok( !$m->login( 'fakeuser', 'password' ), 'not logged in with fake user' );
+ ok( $m->login( 'testuser', 'password' ), 'logged in' );
+}
+
+diag "test form login";
+{
+ $m->logout;
+ $m->get_ok( $baseurl, 'base url' );
+ $m->submit_form(
+ form_number => 1,
+ fields => { user => 'testuser', pass => 'password', },
+ );
+ $m->text_contains( 'Logout', 'logged in via form' );
+}
+
+diag "test redirect after login";
+{
+ $m->logout;
+ $m->get_ok( $baseurl . '/SelfService/Closed.html', 'closed tickets page' );
+ $m->submit_form(
+ form_number => 1,
+ fields => { user => 'testuser', pass => 'password', },
+ );
+ $m->text_contains( 'Logout', 'logged in' );
+ is( $m->uri, $baseurl . '/SelfService/Closed.html' );
+}
$ldap->unbind();
+
More information about the Bps-public-commit
mailing list