[Rt-commit] r8464 - in rtir/branches/2.3-EXPERIMENTAL/t: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed Aug 8 22:22:52 EDT 2007
Author: ruz
Date: Wed Aug 8 22:22:51 2007
New Revision: 8464
Modified:
rtir/branches/2.3-EXPERIMENTAL/t/000-rtir-test-setup.t
rtir/branches/2.3-EXPERIMENTAL/t/001-basic-RTIR.t
rtir/branches/2.3-EXPERIMENTAL/t/002-test-reject.t
rtir/branches/2.3-EXPERIMENTAL/t/003-resolve-IR-when-all-incidents-resolved.t
rtir/branches/2.3-EXPERIMENTAL/t/004-rtfm-in-rtir.t
rtir/branches/2.3-EXPERIMENTAL/t/005-resolve-investigations.t
rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t
rtir/branches/2.3-EXPERIMENTAL/t/009-attachments-processing.t
rtir/branches/2.3-EXPERIMENTAL/t/010-bulk-reject.t
rtir/branches/2.3-EXPERIMENTAL/t/011-merge.t
rtir/branches/2.3-EXPERIMENTAL/t/012-split-incident.t
rtir/branches/2.3-EXPERIMENTAL/t/013-custom-field-ip.t
rtir/branches/2.3-EXPERIMENTAL/t/015-make-clicky.t
rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t
rtir/branches/2.3-EXPERIMENTAL/t/017-locking.t
rtir/branches/2.3-EXPERIMENTAL/t/018-bulk-abandon.t
rtir/branches/2.3-EXPERIMENTAL/t/019-watchers-on-create.t
rtir/branches/2.3-EXPERIMENTAL/t/019-webui-block-fields.t
rtir/branches/2.3-EXPERIMENTAL/t/020-incident-and-investigation.t
rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t
rtir/branches/2.3-EXPERIMENTAL/t/constituency/email.t
rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t
rtir/branches/2.3-EXPERIMENTAL/t/rtir-test.pl
Log:
* don't run tests when we load t/rtir-test.pl, this doesn't
allow us to skip_all tests or do something else config based
with the plan
* use new tiny bits from RT::Test
Modified: rtir/branches/2.3-EXPERIMENTAL/t/000-rtir-test-setup.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/000-rtir-test-setup.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/000-rtir-test-setup.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 3;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/001-basic-RTIR.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/001-basic-RTIR.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/001-basic-RTIR.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 23;
+use Test::More tests => 21;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/002-test-reject.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/002-test-reject.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/002-test-reject.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 53;
+use Test::More tests => 51;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/003-resolve-IR-when-all-incidents-resolved.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/003-resolve-IR-when-all-incidents-resolved.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/003-resolve-IR-when-all-incidents-resolved.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 31;
+use Test::More tests => 29;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/004-rtfm-in-rtir.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/004-rtfm-in-rtir.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/004-rtfm-in-rtir.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 15;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/005-resolve-investigations.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/005-resolve-investigations.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/005-resolve-investigations.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 22;
+use Test::More tests => 20;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 38;
+use Test::More tests => 36;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/009-attachments-processing.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/009-attachments-processing.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/009-attachments-processing.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 52;
+use Test::More tests => 50;
sub tempfile {
require File::Temp;
Modified: rtir/branches/2.3-EXPERIMENTAL/t/010-bulk-reject.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/010-bulk-reject.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/010-bulk-reject.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 45;
+use Test::More tests => 43;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/011-merge.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/011-merge.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/011-merge.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 116;
+use Test::More tests => 114;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/012-split-incident.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/012-split-incident.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/012-split-incident.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 19;
+use Test::More tests => 17;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/013-custom-field-ip.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/013-custom-field-ip.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/013-custom-field-ip.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 420;
+use Test::More tests => 418;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/015-make-clicky.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/015-make-clicky.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/015-make-clicky.t Wed Aug 8 22:22:51 2007
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 35;
+use Test::More tests => 33;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t Wed Aug 8 22:22:51 2007
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 70;
+use Test::More tests => 68;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/017-locking.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/017-locking.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/017-locking.t Wed Aug 8 22:22:51 2007
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 96;
+use Test::More tests => 94;
use HTTP::Cookies;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/018-bulk-abandon.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/018-bulk-abandon.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/018-bulk-abandon.t Wed Aug 8 22:22:51 2007
@@ -1,7 +1,7 @@
use strict;
use Test::WWW::Mechanize;
-use Test::More tests => 107;
+use Test::More tests => 105;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/019-watchers-on-create.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/019-watchers-on-create.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/019-watchers-on-create.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use warnings;
use Test::WWW::Mechanize;
-use Test::More tests => 52;
+use Test::More tests => 50;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/019-webui-block-fields.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/019-webui-block-fields.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/019-webui-block-fields.t Wed Aug 8 22:22:51 2007
@@ -1,7 +1,7 @@
use strict;
use Test::WWW::Mechanize;
-use Test::More tests => 16;
+use Test::More tests => 14;
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/020-incident-and-investigation.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/020-incident-and-investigation.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/020-incident-and-investigation.t Wed Aug 8 22:22:51 2007
@@ -3,7 +3,7 @@
use strict;
use Test::WWW::Mechanize;
-use Test::More tests => 24;
+use Test::More tests => 22;
require "t/rtir-test.pl";
require RT::IR;
Modified: rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t Wed Aug 8 22:22:51 2007
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 180;
+use Test::More tests => 178;
no warnings 'once';
require "t/rtir-test.pl";
Modified: rtir/branches/2.3-EXPERIMENTAL/t/constituency/email.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/constituency/email.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/constituency/email.t Wed Aug 8 22:22:51 2007
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 182;
+use Test::More tests => 180;
require "t/rtir-test.pl";
# Test must be run wtih RT_SiteConfig:
Modified: rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t Wed Aug 8 22:22:51 2007
@@ -9,7 +9,7 @@
# XXX: we should use new RT::Test features and start server with
# option we want.
if ( RT->Config->Get('_RTIR_Constituency_Propagation') eq 'no' ) {
- plan tests => 180;
+ plan tests => 178;
} else {
plan skip_all => 'constituency propagation algorithm is not "no"';
}
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 Wed Aug 8 22:22:51 2007
@@ -16,17 +16,18 @@
use lib qw(/opt/rt3/local/lib /opt/rt3/lib);
use RT;
-ok(RT::LoadConfig, "Loaded configuration");
-ok(RT::Init, "Basic initialization and DB connectivity");
+RT::LoadConfig();
+RT::Init();
require $RT::BasePath. '/lib/t/utils.pl';
my $RTIR_TEST_USER = "rtir_test_user";
my $RTIR_TEST_PASS = "rtir_test_pass";
+require RT::Test;
use RT::Test::Web;
-sub default_agent {
+sub default_agent {
my $agent = new RT::Test::Web;
$agent->cookie_jar( HTTP::Cookies->new );
$agent->login($RTIR_TEST_USER, $RTIR_TEST_PASS);
@@ -110,18 +111,6 @@
sub create_user {
my $user_obj = rtir_user();
- if ($user_obj->Id) {
- $user_obj->SetDisabled(0);
- $user_obj->SetPrivileged(1);
- $user_obj->SetPassword($RTIR_TEST_PASS);
- } else {
- $user_obj->Create(Name => $RTIR_TEST_USER,
- Password => $RTIR_TEST_PASS,
- EmailAddress => "$RTIR_TEST_USER\@example.com",
- RealName => "$RTIR_TEST_USER Smith",
- Privileged => 1);
- }
-
ok($user_obj->Id > 0, "Successfully found the user");
my $group_obj = RT::Group->new(RT::SystemUser());
@@ -133,8 +122,13 @@
}
sub rtir_user {
- my $u = RT::User->new(RT::SystemUser());
- $u->Load($RTIR_TEST_USER);
+ my $u = RT::Test->load_or_create_user(
+ Name => $RTIR_TEST_USER,
+ Password => $RTIR_TEST_PASS,
+ EmailAddress => "$RTIR_TEST_USER\@example.com",
+ RealName => "$RTIR_TEST_USER Smith",
+ Privileged => 1,
+ );
return $u;
}
More information about the Rt-commit
mailing list