[Rt-commit] r8679 - rtir/branches/2.3-EXPERIMENTAL/t
ruz at bestpractical.com
ruz at bestpractical.com
Tue Aug 21 16:43:18 EDT 2007
Author: ruz
Date: Tue Aug 21 16:43:17 2007
New Revision: 8679
Removed:
rtir/branches/2.3-EXPERIMENTAL/t/000-rtir-test-setup.t
Modified:
rtir/branches/2.3-EXPERIMENTAL/t/010-bulk-reject.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/rtir-test.pl
Log:
* another step to RT::Test
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 Tue Aug 21 16:43:17 2007
@@ -19,8 +19,7 @@
push @irs, create_ir($agent, { Subject => "for bulk reject \#$i" });
}
-go_home($agent);
-
+$agent->get_ok('/RTIR/index.html', 'open rtir at glance');
{
$agent->follow_link_ok({ text => '[Bulk Reject]' }, "Followed 'bulk reject' link");
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 Tue Aug 21 16:43:17 2007
@@ -351,7 +351,6 @@
diag("Testing IR locking from other user's point of view");
-go_home($root);
display_ticket($root, $report);
$root->content_like(qr{<div class="locked">}, "IR #$report is locked by another");
$root->follow_link_ok({text => 'Break lock', n => '1'}, "Breaking lock on IR #$report");
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 Tue Aug 21 16:43:17 2007
@@ -74,7 +74,7 @@
my $agent = shift;
my @to_abandon = @_;
- go_home($agent);
+ $agent->get_ok('/RTIR/index.html', 'get rtir at glance page');
$agent->follow_link_ok({text => "Incidents", n => '1'}, "Followed 'Incidents' link");
$agent->follow_link_ok({text => "Bulk Abandon", n => '1'}, "Followed 'Bulk Abandon' link");
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 Tue Aug 21 16:43:17 2007
@@ -46,7 +46,7 @@
my $agent = shift;
my $id = shift;
- $agent->get_ok(RT->Config->Get('WebURL') . "/RTIR/Display.html?id=$id", "Loaded Display page for Ticket #$id");
+ $agent->get_ok("/RTIR/Display.html?id=$id", "Loaded Display page for Ticket #$id");
}
sub ticket_state {
@@ -100,28 +100,14 @@
return 1;
}
-sub create_user {
- my $user_obj = rtir_user();
-
- ok($user_obj->Id > 0, "Successfully found the user");
-
- my $group_obj = RT::Group->new(RT::SystemUser());
- $group_obj->LoadUserDefinedGroup("DutyTeam");
- ok($group_obj->Id > 0, "Successfully found the DutyTeam group");
-
- $group_obj->AddMember($user_obj->Id);
- ok($group_obj->HasMember($user_obj->PrincipalObj), "user is in the group");
-}
-
sub rtir_user {
- my $u = RT::Test->load_or_create_user(
+ return 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,
+ MemberOf => 'DutyTeam',
);
- return $u;
}
sub create_incident {
More information about the Rt-commit
mailing list