[Rt-commit] r8245 - rtir/branches/2.3-EXPERIMENTAL/t
ruz at bestpractical.com
ruz at bestpractical.com
Fri Jul 20 19:00:37 EDT 2007
Author: ruz
Date: Fri Jul 20 19:00:37 2007
New Revision: 8245
Modified:
rtir/branches/2.3-EXPERIMENTAL/t/rtir-test.pl
Log:
* use login method from new RT::Test::Web
Modified: rtir/branches/2.3-EXPERIMENTAL/t/rtir-test.pl
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/rtir-test.pl (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/rtir-test.pl Fri Jul 20 19:00:37 2007
@@ -9,7 +9,6 @@
use strict;
use warnings;
-use Test::WWW::Mechanize;
use HTTP::Cookies;
use Test::More;
@@ -25,13 +24,13 @@
my $RTIR_TEST_USER = "rtir_test_user";
my $RTIR_TEST_PASS = "rtir_test_pass";
+use RT::Test::Web;
sub default_agent {
- my $agent = Test::WWW::Mechanize->new();
- $agent->cookie_jar(HTTP::Cookies->new);
-
+ my $agent = new RT::Test::Web;
+ $agent->cookie_jar( HTTP::Cookies->new );
+ $agent->login($RTIR_TEST_USER, $RTIR_TEST_PASS);
go_home($agent);
- log_in($agent);
return $agent;
}
@@ -50,18 +49,6 @@
$agent->get_ok("$weburl/RTIR/index.html", "Loaded home page");
}
-sub log_in {
- my $agent = shift;
-
- if ($agent->title eq 'Login') {
-# diag("logging in");
- $agent->form_number(1);
- $agent->field("user", $RTIR_TEST_USER);
- $agent->field("pass", $RTIR_TEST_PASS);
- $agent->submit_form(form_number => "1");
- }
-}
-
sub display_ticket {
my $agent = shift;
my $id = shift;
More information about the Rt-commit
mailing list