[Rt-commit] r7164 - rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api

clkao at bestpractical.com clkao at bestpractical.com
Mon Mar 5 16:50:32 EST 2007


Author: clkao
Date: Mon Mar  5 16:50:31 2007
New Revision: 7164

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t
   rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t

Log:
ticket uri tests need at least one ticket in system.

Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t	Mon Mar  5 16:50:31 2007
@@ -1,16 +1,15 @@
-
-use Test::More qw/no_plan/;
+use Test::More tests => 8;
 use RT;
 use RT::Test;
 
-
-{
-    undef $main::_STDOUT_;
-    undef $main::_STDERR_;
-
 use_ok("RT::URI::fsck_com_rt");
 my $uri = RT::URI::fsck_com_rt->new($RT::SystemUser);
 
+my $t1 = RT::Ticket->new($RT::SystemUser);
+my ($trans);
+($id,$trans,$msg) =$t1->Create (Queue => 'general', Subject => 'Requestor test one', );
+ok ($id, $msg);
+
 ok(ref($uri));
 
 ok (UNIVERSAL::isa($uri,RT::URI::fsck_com_rt), "It's an RT::URI::fsck_com_rt");
@@ -21,22 +20,9 @@
 is ($uri->LocalURIPrefix , 'fsck.com-rt://'.RT->Config->Get('Organization'));
 
 
-    undef $main::_STDOUT_;
-    undef $main::_STDERR_;
-}
-
-{
-    undef $main::_STDOUT_;
-    undef $main::_STDERR_;
-
 my $ticket = RT::Ticket->new($RT::SystemUser);
 $ticket->Load(1);
 my $uri = RT::URI::fsck_com_rt->new($ticket->CurrentUser);
 is($uri->LocalURIPrefix. "/ticket/1" , $uri->URIForObject($ticket));
 
-
-    undef $main::_STDOUT_;
-    undef $main::_STDERR_;
-}
-
 1;

Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t	Mon Mar  5 16:50:31 2007
@@ -1,12 +1,11 @@
-
-use Test::More qw/no_plan/;
+use Test::More tests => 2;
 use RT;
 use RT::Test;
 
-
-{
-    undef $main::_STDOUT_;
-    undef $main::_STDERR_;
+my $t1 = RT::Ticket->new($RT::SystemUser);
+my ($trans);
+($id,$trans,$msg) =$t1->Create (Queue => 'general', Subject => 'Requestor test one', );
+ok ($id, $msg);
 
 use_ok("RT::URI::t");
 my $uri = RT::URI::t->new($RT::SystemUser);
@@ -19,9 +18,4 @@
 is($uri->URI, 'fsck.com-rt://'.RT->Config->Get('Organization').'/ticket/1',
    "URI object has correct URI string");
 
-
-    undef $main::_STDOUT_;
-    undef $main::_STDERR_;
-}
-
 1;


More information about the Rt-commit mailing list