[Rt-commit] [svn] r916 - in rt/branches/rt-3.1: . bin lib/t
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Mon May 17 16:52:59 EDT 2004
Author: jesse
Date: Mon May 17 16:52:59 2004
New Revision: 916
Modified:
rt/branches/rt-3.1/ (props changed)
rt/branches/rt-3.1/bin/rt.in
rt/branches/rt-3.1/lib/t/04_send_email.pl.in
Log:
----------------------------------------------------------------------
r1597 at debian: jesse | 2004-05-18T05:37:49.734434Z
----------------------------------------------------------------------
r1599 at debian: jesse | 2004-05-18T05:51:45.332470Z
Merge forward from 3.0
----------------------------------------------------------------------
Modified: rt/branches/rt-3.1/bin/rt.in
==============================================================================
--- rt/branches/rt-3.1/bin/rt.in (original)
+++ rt/branches/rt-3.1/bin/rt.in Mon May 17 16:52:59 2004
@@ -197,6 +197,9 @@
my ($q, $type, %data);
$orderby = $config{orderby};
+ if ($config{orderby}) {
+ $data{orderby} = $config{orderby};
+ }
my $bad = 0;
while (@ARGV) {
@@ -209,7 +212,7 @@
$bad = 1, last unless get_var_argument(\%data);
}
elsif (/^-o$/) {
- $data{orderby} = shift @ARGV;
+ $data{'orderby'} = shift @ARGV;
}
elsif (/^-([isl])$/) {
$data{format} = $1;
@@ -230,10 +233,8 @@
$bad = 1; last;
}
}
-
- if (!defined $q)
- {
- $q = $config{query} ;
+ if (!defined $q) {
+ $q = $config{query};
}
$type ||= "ticket";
@@ -244,7 +245,7 @@
}
return help("list", $type) if $bad;
- my $r = submit("$REST/search/$type", { query => $q, %data, orderby => $data{orderby} || "" });
+ my $r = submit("$REST/search/$type", { query => $q, %data });
print $r->content;
}
Modified: rt/branches/rt-3.1/lib/t/04_send_email.pl.in
==============================================================================
--- rt/branches/rt-3.1/lib/t/04_send_email.pl.in (original)
+++ rt/branches/rt-3.1/lib/t/04_send_email.pl.in Mon May 17 16:52:59 2004
@@ -476,6 +476,31 @@
# }}}
+# {{{ test a multi-line RT-Send-CC header
+
+my $content = `cat @RT_LIB_PATH@/t/data/rt-send-cc` || die "couldn't find new content";
+
+$parser->ParseMIMEEntityFromScalar($content);
+
+
+
+my %args = (message => $content, queue => 1, action => 'correspond');
+ RT::Interface::Email::Gateway(\%args);
+my $tickets = RT::Tickets->new($RT::SystemUser);
+$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
+my $tick = $tickets->First();
+ok ($tick->Id, "found ticket ".$tick->Id);
+
+my $cc = $tick->Transactions->First->Attachments->First->GetHeader('RT-Send-Cc');
+ok ($cc =~ /test1/, "Found test 1");
+ok ($cc =~ /test2/, "Found test 2");
+ok ($cc =~ /test3/, "Found test 3");
+ok ($cc =~ /test4/, "Found test 4");
+ok ($cc =~ /test5/, "Found test 5");
+
+# }}}
+
# Don't taint the environment
$everyone->PrincipalObj->RevokeRight(Right =>'SuperUser');
1;
More information about the Rt-commit
mailing list