[Rt-commit] rt branch, 3.999-trunk, updated. fa0c205dc43955b7780bdc027f1f237b0c09e943

clkao at bestpractical.com clkao at bestpractical.com
Tue Nov 3 06:17:30 EST 2009


The branch, 3.999-trunk has been updated
       via  fa0c205dc43955b7780bdc027f1f237b0c09e943 (commit)
       via  b8071ad0b702d29ddce2f9c89a6e81cb99182344 (commit)
       via  a216ee3ac74735ca4927a66dcd8227ced286f20a (commit)
       via  bcabf1ae4343bc44e69208cabd18ed2e5ebd76c0 (commit)
       via  8654b51533f0bc2f01b426672d65c2bab3802713 (commit)
       via  e46c30e00c578e99913a44c092f6d649b208599d (commit)
       via  15c9628dd63c7866a48c1b715093260c45bb75d7 (commit)
       via  dbdd330dc0c6dcb4dbbde03d99c5802db7a9bd3a (commit)
       via  ba6a2d27e33d6abf5033976fc795c63f12f76e54 (commit)
       via  3ad5061593f42dabca56411004af330a7779318b (commit)
      from  f122c8db89b7aedbddf47471c5efcde8b6b4fbaf (commit)

Summary of changes:
 lib/RT/Base.pm                             |   26 ++++++++++++---
 lib/RT/EmailParser.pm                      |    2 -
 lib/RT/Record.pm                           |    2 -
 lib/RT/Reminders.pm                        |   16 ++-------
 lib/RT/SavedSearches.pm                    |    9 +----
 lib/RT/ScripAction.pm                      |   12 -------
 lib/RT/SharedSetting.pm                    |   14 +-------
 lib/RT/Shredder/Plugin/Base.pm             |    8 ----
 lib/RT/URI.pm                              |   16 ---------
 lib/RT/URI/base.pm                         |   13 -------
 share/html/Admin/CustomFields/Objects.html |    2 +-
 share/html/REST/1.0/dhandler               |    2 +-
 t/00-compile.t                             |   20 ++++++++++-
 t/api/link.t                               |   26 --------------
 t/api/rt.t                                 |   20 -----------
 t/api/system.t                             |   13 ++++++-
 t/api/template.t                           |   21 ------------
 t/api/uri-custom.t                         |   50 ++++++++++++++++++++++++++++
 t/api/uri-fsck_com_rt.t                    |   29 ----------------
 t/api/uri-t.t                              |   22 ------------
 t/mail/verp.t                              |    9 -----
 t/shredder/00load.t                        |   26 --------------
 22 files changed, 110 insertions(+), 248 deletions(-)
 delete mode 100644 t/api/link.t
 delete mode 100644 t/api/rt.t
 delete mode 100644 t/api/template.t
 create mode 100644 t/api/uri-custom.t
 delete mode 100644 t/api/uri-fsck_com_rt.t
 delete mode 100644 t/api/uri-t.t
 delete mode 100644 t/mail/verp.t
 delete mode 100644 t/shredder/00load.t

- Log -----------------------------------------------------------------
commit 3ad5061593f42dabca56411004af330a7779318b
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 17:41:13 2009 +0800

    Fix an incorrect _() usage that leaks args to abort().

diff --git a/share/html/Admin/CustomFields/Objects.html b/share/html/Admin/CustomFields/Objects.html
index 4743b1d..ba3139d 100644
--- a/share/html/Admin/CustomFields/Objects.html
+++ b/share/html/Admin/CustomFields/Objects.html
@@ -71,7 +71,7 @@
 my $CF = RT::Model::CustomField->new( current_user => Jifty->web->current_user );
 $CF->load($id) if ($id);
 
-unless ($CF->id) {  abort(_("Could not load CustomField %1"), $id)};
+unless ($CF->id) {  abort(_("Could not load CustomField %1", $id))};
 my $lookup_type = $CF->lookup_type || '';
 $lookup_type =~ /^(.*?)-/ ||
      abort(_("object of type %1 cannot take custom fields", $lookup_type));

commit ba6a2d27e33d6abf5033976fc795c63f12f76e54
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 17:42:30 2009 +0800

    Correct RT::Reminder's current_user and avoid spurious SystemUser usage.

diff --git a/lib/RT/Reminders.pm b/lib/RT/Reminders.pm
index 4a027fb..81cdea6 100644
--- a/lib/RT/Reminders.pm
+++ b/lib/RT/Reminders.pm
@@ -55,7 +55,7 @@ sub new {
     my $class = shift;
     my $self  = {};
     bless $self, $class;
-    $self->current_user(@_);
+    $self->_get_current_user;
     return ($self);
 }
 
@@ -68,8 +68,7 @@ sub ticket {
 sub ticket_obj {
     my $self = shift;
     unless ( $self->{'_ticketobj'} ) {
-        $self->{'_ticketobj'} =
-          RT::Model::Ticket->new( current_user => RT->system_user );
+        $self->{'_ticketobj'} = RT::Model::Ticket->new;
         $self->{'_ticketobj'}->load( $self->ticket );
     }
     return $self->{'_ticketobj'};
@@ -83,8 +82,7 @@ Returns an RT::Model::TicketCollection object containing reminders for this obje
 
 sub collection {
     my $self = shift;
-    my $col =
-      RT::Model::TicketCollection->new( current_user => RT->system_user );
+    my $col = RT::Model::TicketCollection->new;
 
     my $query = 'type = "reminder" AND RefersTo = "' . $self->ticket . '"';
 
@@ -115,7 +113,7 @@ sub add {
         @_
     );
 
-    my $reminder = RT::Model::Ticket->new( current_user => RT->system_user );
+    my $reminder = RT::Model::Ticket->new;
     $reminder->create(
         subject   => $args{'subject'},
         owner     => $args{'owner'},

commit dbdd330dc0c6dcb4dbbde03d99c5802db7a9bd3a
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:01:12 2009 +0800

    RT::EmailParser and RT::Record don't need to use base RT::Base.
    
    - RT::EmailParser is not using any current_user stuff
    - RT::Record is a subclass of Jifty::Record which does what RT::Base provides.

diff --git a/lib/RT/EmailParser.pm b/lib/RT/EmailParser.pm
index 4c43c67..9b9212a 100755
--- a/lib/RT/EmailParser.pm
+++ b/lib/RT/EmailParser.pm
@@ -47,8 +47,6 @@
 # END BPS TAGGED BLOCK }}}
 package RT::EmailParser;
 
-use base qw/RT::Base/;
-
 use strict;
 use warnings;
 
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 1646fae..94324bc 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -73,8 +73,6 @@ use Encode qw();
 
 our $_TABLE_ATTR = {};
 use base qw(Jifty::Record);
-use base qw(RT::Base);
-
 
 sub table {
     my $class = shift;
diff --git a/t/api/link.t b/t/api/link.t
index 7c259f3..2a403f3 100644
--- a/t/api/link.t
+++ b/t/api/link.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use RT::Test; use Test::More; 
-plan tests => 5;
+plan tests => 4;
 use RT;
 
 
@@ -16,7 +16,6 @@ my $link = RT::Model::Link->new(current_user => RT->system_user);
 
 ok (ref $link);
 ok (UNIVERSAL::isa($link, 'RT::Model::Link'));
-ok (UNIVERSAL::isa($link, 'RT::Base'));
 ok (UNIVERSAL::isa($link, 'RT::Record'));
 ok (UNIVERSAL::isa($link, 'Jifty::DBI::Record'));
 

commit 15c9628dd63c7866a48c1b715093260c45bb75d7
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:15:56 2009 +0800

    silence the warning for doing numerical comparison for "200 OK".

diff --git a/share/html/REST/1.0/dhandler b/share/html/REST/1.0/dhandler
index 0807c5f..219b5b0 100755
--- a/share/html/REST/1.0/dhandler
+++ b/share/html/REST/1.0/dhandler
@@ -321,6 +321,6 @@ unshift(@output, [ join "\n", @comments ]) if @comments;
 $output = form_compose(\@output);
 
 OUTPUT:
-$m->out("RT/".$RT::VERSION ." ".$status ."\n\n$output\n") if ($output || $status != 200);
+$m->out("RT/".$RT::VERSION ." ".$status ."\n\n$output\n") if ($output || $status !~ m/^200/);
 return;
 </%INIT>

commit e46c30e00c578e99913a44c092f6d649b208599d
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:29:35 2009 +0800

    Refactor RT::Base to provide constructor for classes using current_user.

diff --git a/lib/RT/Base.pm b/lib/RT/Base.pm
index 1281066..2d2f101 100755
--- a/lib/RT/Base.pm
+++ b/lib/RT/Base.pm
@@ -53,8 +53,8 @@ use warnings;
 
 =head1 NAME
 
-RT::Base
-
+RT::Base is the base class for RT classes that require some
+current_user context.
 
 =head1 SYNOPSIS
 
@@ -62,8 +62,29 @@ RT::Base
 
 =head1 FUNCTIONS
 
+=head2 new
+
+The constructor builds C<current_user> using L<Jifty::Object>'s logic.
+The caller can pass the argument C<current_user => $current_user> in,
+or it will traverse the caller stack and find the invoker's
+current_user.  Finally it falls back to the web session's current
+user.  C<_init> is also called by the constructor.
+
 =cut
 
+sub new {
+    my $proto = shift;
+    my $class = ref($proto) || $proto;
+    my $self  = {};
+    bless( $self, $class );
+    $self->_get_current_user(@_);
+    $self->_init(@_);
+    return ($self);
+}
+
+sub _init {
+}
+
 sub loc {
     shift;
     _(@_);
diff --git a/lib/RT/Reminders.pm b/lib/RT/Reminders.pm
index 81cdea6..8a8a158 100644
--- a/lib/RT/Reminders.pm
+++ b/lib/RT/Reminders.pm
@@ -51,14 +51,6 @@ use base qw/RT::Base/;
 
 our $REMINDER_QUEUE = 'General';
 
-sub new {
-    my $class = shift;
-    my $self  = {};
-    bless $self, $class;
-    $self->_get_current_user;
-    return ($self);
-}
-
 sub ticket {
     my $self = shift;
     $self->{'_ticket'} = shift if (@_);
diff --git a/lib/RT/SavedSearches.pm b/lib/RT/SavedSearches.pm
index 7702a4d..f59621d 100644
--- a/lib/RT/SavedSearches.pm
+++ b/lib/RT/SavedSearches.pm
@@ -72,15 +72,10 @@ use RT::SavedSearch;
 use strict;
 use base 'RT::Base';
 
-sub new {
-    my $proto = shift;
-    my $class = ref($proto) || $proto;
-    my $self  = {};
-    bless( $self, $class );
-    $self->_get_current_user(@_);
+sub _init {
+    my $self = shift;
     $self->{'idx'}     = 0;
     $self->{'objects'} = [];
-    return $self;
 }
 
 =head2 limit_to_privacy
diff --git a/lib/RT/ScripAction.pm b/lib/RT/ScripAction.pm
index eb2da9a..f8e0678 100644
--- a/lib/RT/ScripAction.pm
+++ b/lib/RT/ScripAction.pm
@@ -68,21 +68,10 @@ use Scalar::Util;
 
 use base qw/RT::Base/;
 
-sub new {
-    my $proto = shift;
-    my $class = ref($proto) || $proto;
-    my $self  = {};
-    bless( $self, $class );
-    $self->_init(@_);
-    return $self
-}
-
-
 sub _init {
     my $self = shift;
     my %args = (
         argument       => undef,
-        current_user    => undef,
         template_obj    => undef,
         ticket_obj      => undef,
         transaction_obj => undef,
@@ -92,7 +81,6 @@ sub _init {
     );
 
     $self->{'argument'} = $args{'argument'};
-    $self->current_user( $args{'current_user'} );
     $self->{'template_obj'}    = $args{'template_obj'};
     $self->{'ticket_obj'}      = $args{'ticket_obj'};
     $self->{'transaction_obj'} = $args{'transaction_obj'};
diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
index ca76333..29cdfc5 100644
--- a/lib/RT/SharedSetting.pm
+++ b/lib/RT/SharedSetting.pm
@@ -69,21 +69,11 @@ use base qw/RT::Base/;
 
 =head1 METHODS
 
-=head2 new
-
-Returns a new L<RT::SharedSetting> object.
-Takes the current user, see also L<RT::Base>.
-
 =cut
 
-sub new {
-    my $proto = shift;
-    my $class = ref($proto) || $proto;
-    my $self  = {};
+sub _init {
+    my $self = shift;
     $self->{'id'} = 0;
-    bless( $self, $class );
-    $self->_get_current_user(@_);
-
     return $self;
 }
 
diff --git a/lib/RT/Shredder/Plugin/Base.pm b/lib/RT/Shredder/Plugin/Base.pm
index 5d7a6c8..f53d60b 100644
--- a/lib/RT/Shredder/Plugin/Base.pm
+++ b/lib/RT/Shredder/Plugin/Base.pm
@@ -57,16 +57,8 @@ RT::Shredder::Plugin::Base - base class for Shredder plugins.
 
 =cut
 
-sub new {
-    my $proto = shift;
-    my $self = bless( {}, ref $proto || $proto );
-    $self->_init(@_);
-    return $self;
-}
-
 sub _init {
     my $self = shift;
-    $self->_get_current_user(@_);
     $self->{'opt'} = {@_};
 }
 
diff --git a/lib/RT/URI.pm b/lib/RT/URI.pm
index a9497ce..ff91831 100755
--- a/lib/RT/URI.pm
+++ b/lib/RT/URI.pm
@@ -69,22 +69,6 @@ by RT::Model::Link objects.
 
 =cut
 
-=head2 new
-
-Create a RT::URI->new Object.
-
-=cut
-
-sub new {
-    my $proto = shift;
-    my $class = ref($proto) || $proto;
-    my $self  = {};
-    bless( $self, $class );
-    $self->_get_current_user(@_);
-    return ($self);
-}
-
-
 =head2 from_object <object>
 
 Given a local object, such as an RT::Model::Ticket or an RT::FM::Article, this routine will return a URI for
diff --git a/lib/RT/URI/base.pm b/lib/RT/URI/base.pm
index 755b57c..559b12d 100755
--- a/lib/RT/URI/base.pm
+++ b/lib/RT/URI/base.pm
@@ -63,21 +63,8 @@ handle the API presented here
 
 =head1 API
 
-=head2 new
-
-Create a new URI handler
-
 =cut
 
-sub new {
-    my $class = shift;
-    my $self  = {};
-    bless $self => ref($class) || $class;
-    $self->_get_current_user(@_);
-    return $self;
-
-}
-
 sub parse_object {
     my $self = shift;
     my $obj  = shift;

commit 8654b51533f0bc2f01b426672d65c2bab3802713
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:30:46 2009 +0800

    Remove loc method from RT::Base

diff --git a/lib/RT/Base.pm b/lib/RT/Base.pm
index 2d2f101..844fbbe 100755
--- a/lib/RT/Base.pm
+++ b/lib/RT/Base.pm
@@ -85,9 +85,4 @@ sub new {
 sub _init {
 }
 
-sub loc {
-    shift;
-    _(@_);
-}
-
 1;

commit bcabf1ae4343bc44e69208cabd18ed2e5ebd76c0
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:36:46 2009 +0800

    merge shredder load test into 00-compile.

diff --git a/t/00-compile.t b/t/00-compile.t
index 7d58772..7653a27 100644
--- a/t/00-compile.t
+++ b/t/00-compile.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use RT::Test;
-use Test::More tests => 25;
+use Test::More;
 
 require_ok("RT");
 require_ok("RT::Test");
@@ -30,6 +30,24 @@ require_ok("RT::SavedSearch");
 require_ok("RT::SavedSearches");
 require_ok("RT::Util");
 
+use_ok("RT::Shredder");
+
+use_ok("RT::Shredder::Plugin");
+use_ok("RT::Shredder::Plugin::Base");
+
+# search plugins
+use_ok("RT::Shredder::Plugin::Base::Search");
+use_ok("RT::Shredder::Plugin::Objects");
+use_ok("RT::Shredder::Plugin::Attachments");
+use_ok("RT::Shredder::Plugin::Tickets");
+use_ok("RT::Shredder::Plugin::Users");
+
+# dump plugins
+use_ok("RT::Shredder::Plugin::Base::Dump");
+use_ok("RT::Shredder::Plugin::SQLDump");
+use_ok("RT::Shredder::Plugin::Summary");
+
+done_testing();
 
 # no the following doesn't work yet
 __END__
diff --git a/t/shredder/00load.t b/t/shredder/00load.t
deleted file mode 100644
index 4622a29..0000000
--- a/t/shredder/00load.t
+++ /dev/null
@@ -1,26 +0,0 @@
-use strict;
-use warnings;
-use File::Spec;
-use Test::More tests => 11;
-
-use RT::Test;
-
-use RT::Test::Shredder;
-
-use_ok("RT::Shredder");
-
-use_ok("RT::Shredder::Plugin");
-use_ok("RT::Shredder::Plugin::Base");
-
-# search plugins
-use_ok("RT::Shredder::Plugin::Base::Search");
-use_ok("RT::Shredder::Plugin::Objects");
-use_ok("RT::Shredder::Plugin::Attachments");
-use_ok("RT::Shredder::Plugin::Tickets");
-use_ok("RT::Shredder::Plugin::Users");
-
-# dump plugins
-use_ok("RT::Shredder::Plugin::Base::Dump");
-use_ok("RT::Shredder::Plugin::SQLDump");
-use_ok("RT::Shredder::Plugin::Summary");
-

commit a216ee3ac74735ca4927a66dcd8227ced286f20a
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:49:28 2009 +0800

    Merge t/api/rt.t into t/api/system.t.

diff --git a/t/api/rt.t b/t/api/rt.t
deleted file mode 100644
index 2c69981..0000000
--- a/t/api/rt.t
+++ /dev/null
@@ -1,20 +0,0 @@
-
-use strict;
-use warnings;
-use RT::Test; use Test::More; 
-plan tests => 4;
-use RT;
-
-
-
-{
-
-is (RT->nobody->name() , 'Nobody', "Nobody is nobody");
-isnt (RT->nobody->name() , 'root', "Nobody isn't named root");
-is (RT->system_user->name() , 'RT_System', "The system user is RT_System");
-isnt (RT->system_user->name() , 'noname', "The system user isn't noname");
-
-
-}
-
-1;
diff --git a/t/api/system.t b/t/api/system.t
index a187ac3..32f9526 100644
--- a/t/api/system.t
+++ b/t/api/system.t
@@ -1,8 +1,7 @@
 
 use strict;
 use warnings;
-use RT::Test; use Test::More; 
-plan tests => 7;
+use RT::Test tests => 11;
 use RT;
 
 
@@ -32,4 +31,14 @@ is ($sys->id, 1);
 
 }
 
+{
+
+
+is (RT->nobody->name() , 'Nobody', "Nobody is nobody");
+isnt (RT->nobody->name() , 'root', "Nobody isn't named root");
+is (RT->system_user->name() , 'RT_System', "The system user is RT_System");
+isnt (RT->system_user->name() , 'noname', "The system user isn't noname");
+
+}
+
 1;

commit b8071ad0b702d29ddce2f9c89a6e81cb99182344
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:52:01 2009 +0800

    Merge custom uri tests.

diff --git a/t/api/uri-custom.t b/t/api/uri-custom.t
new file mode 100644
index 0000000..c1dee40
--- /dev/null
+++ b/t/api/uri-custom.t
@@ -0,0 +1,50 @@
+use strict;
+use warnings;
+use RT::Test; use Test::More tests => 14;
+use RT;
+
+{
+use_ok("RT::URI::fsck_com_rt");
+my $uri = RT::URI::fsck_com_rt->new(current_user => RT->system_user);
+
+my $t1 = RT::Model::Ticket->new(current_user => RT->system_user);
+my ($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");
+
+ok ($uri->isa('RT::URI::base'), "It's an RT::URI::base");
+ok ($uri->isa('RT::Base'), "It's an RT::Base");
+
+is ($uri->local_uri_prefix , 'fsck.com-rt://'.RT->config->get('organization'));
+
+
+my $ticket = RT::Model::Ticket->new(current_user => RT->system_user);
+$ticket->load(1);
+$uri = RT::URI::fsck_com_rt->new(current_user => $ticket->current_user);
+is($uri->local_uri_prefix. "/ticket/1" , $uri->uri_for_object($ticket));
+
+}
+
+{
+
+my $t1 = RT::Model::Ticket->new(current_user => RT->system_user);
+my ($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(current_user => RT->system_user);
+ok(ref($uri), "URI object exists");
+
+my $uristr = "t:1";
+$uri->parse_uri($uristr);
+is(ref($uri->object), "RT::Model::Ticket", "object loaded is a ticket");
+is($uri->object->id, 1, "object loaded has correct ID");
+is($uri->uri, 'fsck.com-rt://'.RT->config->get('organization').'/ticket/1',
+   "URI object has correct URI string");
+
+}
+
+1;
diff --git a/t/api/uri-fsck_com_rt.t b/t/api/uri-fsck_com_rt.t
deleted file mode 100644
index b795533..0000000
--- a/t/api/uri-fsck_com_rt.t
+++ /dev/null
@@ -1,29 +0,0 @@
-use strict;
-use warnings;
-use RT::Test; use Test::More tests => 8;
-use RT;
-
-
-use_ok("RT::URI::fsck_com_rt");
-my $uri = RT::URI::fsck_com_rt->new(current_user => RT->system_user);
-
-my $t1 = RT::Model::Ticket->new(current_user => RT->system_user);
-my ($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");
-
-ok ($uri->isa('RT::URI::base'), "It's an RT::URI::base");
-ok ($uri->isa('RT::Base'), "It's an RT::Base");
-
-is ($uri->local_uri_prefix , 'fsck.com-rt://'.RT->config->get('organization'));
-
-
-my $ticket = RT::Model::Ticket->new(current_user => RT->system_user);
-$ticket->load(1);
-$uri = RT::URI::fsck_com_rt->new(current_user => $ticket->current_user);
-is($uri->local_uri_prefix. "/ticket/1" , $uri->uri_for_object($ticket));
-
-1;
diff --git a/t/api/uri-t.t b/t/api/uri-t.t
deleted file mode 100644
index 742f579..0000000
--- a/t/api/uri-t.t
+++ /dev/null
@@ -1,22 +0,0 @@
-use strict;
-use warnings;
-use RT::Test; use Test::More tests => 6;
-use RT;
-
-
-my $t1 = RT::Model::Ticket->new(current_user => RT->system_user);
-my ($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(current_user => RT->system_user);
-ok(ref($uri), "URI object exists");
-
-my $uristr = "t:1";
-$uri->parse_uri($uristr);
-is(ref($uri->object), "RT::Model::Ticket", "object loaded is a ticket");
-is($uri->object->id, 1, "object loaded has correct ID");
-is($uri->uri, 'fsck.com-rt://'.RT->config->get('organization').'/ticket/1',
-   "URI object has correct URI string");
-
-1;

commit fa0c205dc43955b7780bdc027f1f237b0c09e943
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 3 18:52:35 2009 +0800

    remove trivial tests.

diff --git a/t/api/link.t b/t/api/link.t
deleted file mode 100644
index 2a403f3..0000000
--- a/t/api/link.t
+++ /dev/null
@@ -1,25 +0,0 @@
-
-use strict;
-use warnings;
-use RT::Test; use Test::More; 
-plan tests => 4;
-use RT;
-
-
-
-{
-
-
-use RT::Model::Link;
-my $link = RT::Model::Link->new(current_user => RT->system_user);
-
-
-ok (ref $link);
-ok (UNIVERSAL::isa($link, 'RT::Model::Link'));
-ok (UNIVERSAL::isa($link, 'RT::Record'));
-ok (UNIVERSAL::isa($link, 'Jifty::DBI::Record'));
-
-
-}
-
-1;
diff --git a/t/api/template.t b/t/api/template.t
deleted file mode 100644
index 4f19292..0000000
--- a/t/api/template.t
+++ /dev/null
@@ -1,21 +0,0 @@
-
-use strict;
-use warnings;
-use RT::Test; use Test::More; 
-plan tests => 2;
-use RT;
-
-
-
-
-ok(require RT::Model::Template);
-
-my $t = RT::Model::Template->new(current_user => RT->system_user);
-$t->create(name => "Foo", queue => 1);
-my $t2 = RT::Model::Template->new(current_user => RT->nobody);
-$t2->load($t->id);
-ok($t2->queue->id, "Got the template's queue objet");
-
-
-
-1;
diff --git a/t/mail/verp.t b/t/mail/verp.t
deleted file mode 100644
index c2f7bd0..0000000
--- a/t/mail/verp.t
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use RT::Test; use Test::More tests => 1;
-
-TODO: { 
-    todo_skip "No tests written for VERP yet", 1;
-    ok(1,"a test to skip");
-}

-----------------------------------------------------------------------


More information about the Rt-commit mailing list