diff options
author | ivan <ivan> | 2011-02-17 00:25:23 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-02-17 00:25:23 +0000 |
commit | 0fb307c305e4bc2c9c27dc25a3308beae3a4d33c (patch) | |
tree | 9d527e17db4b4d875f63f019dcd513762bb938a6 /rt/t/web/rights1.t | |
parent | 6a79fae0c14b6635c67b4f224ee4a14f263b37d0 (diff) | |
parent | fc6209f398899f0211cfcedeb81a3cd65e04a941 (diff) |
This commit was generated by cvs2svn to compensate for changes in r10640,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/t/web/rights1.t')
-rw-r--r-- | rt/t/web/rights1.t | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/rt/t/web/rights1.t b/rt/t/web/rights1.t index 6da204cc9..c8892f2fe 100644 --- a/rt/t/web/rights1.t +++ b/rt/t/web/rights1.t @@ -2,7 +2,7 @@ use strict; use HTTP::Cookies; -use RT::Test tests => 35; +use RT::Test tests => 29; my ($baseurl, $agent) = RT::Test->started_ok; # Create a user with basically no rights, to start. @@ -26,7 +26,7 @@ $agent->cookie_jar($cookie_jar); no warnings 'once'; # get the top page -login($agent, $user_obj); +$agent->login( $user_obj->Name, 'customer'); # Test for absence of Configure and Preferences tabs. ok(!$agent->find_link( url => "$RT::WebPath/Admin/", @@ -107,28 +107,4 @@ ok($agent->form_name('BuildQuery'), "Yep, form is still there"); my $input = $agent->current_form->find_input('ValueOfActor'); ok(grep(/customer-$$/, $input->value_names()), "Found self in the actor listing"); -sub login { - my $agent = shift; - - my $url = "http://localhost:" . RT->Config->Get('WebPort') . RT->Config->Get('WebPath') . "/"; - $agent->get($url); - is( $agent->{'status'}, 200, - "Loaded a page - http://localhost" . RT->Config->Get('WebPath') ); - - # {{{ test a login - - # follow the link marked "Login" - - ok( $agent->{form}->find_input('user') ); - - ok( $agent->{form}->find_input('pass') ); - like( $agent->{'content'} , qr/username:/i ); - $agent->field( 'user' => $user_obj->Name ); - $agent->field( 'pass' => 'customer' ); - - # the field isn't named, so we have to click link 0 - $agent->click(0); - is( $agent->{'status'}, 200, "Fetched the page ok" ); - like( $agent->{'content'} , qr/Logout/i, "Found a logout link" ); -} 1; |