[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.10-81-gaf4711a
Ruslan Zakirov
ruz at bestpractical.com
Tue Mar 12 13:15:58 EDT 2013
The branch, 4.0-trunk has been updated
via af4711aa0f814e91392e72942ce44303f8d4c2e6 (commit)
via 856fad17c3b08be0aace12c69247be5371f61102 (commit)
via b68179cd8515cd9485afe7114e75ae0b41929145 (commit)
from 7e11127f257aa8bbbc6cc43c38d807346c5edf69 (commit)
Summary of changes:
etc/RT_Config.pm.in | 2 +-
t/mail/extractsubjecttag.t | 23 ++++++++++++++++++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 856fad17c3b08be0aace12c69247be5371f61102
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Tue Mar 12 20:55:10 2013 +0400
test subject tag extraction is not greedy
diff --git a/t/mail/extractsubjecttag.t b/t/mail/extractsubjecttag.t
index c6a5511..14fab44 100644
--- a/t/mail/extractsubjecttag.t
+++ b/t/mail/extractsubjecttag.t
@@ -2,7 +2,7 @@ use strict;
use warnings;
use utf8;
-use RT::Test tests => 13;
+use RT::Test tests => 18;
my $queue = RT::Test->load_or_create_queue(
Name => 'Regression',
@@ -83,3 +83,24 @@ EOF
}
+diag "Test that extraction of another RT's subject tag grabs only tag";
+{
+ my $ticketid = $original_ticket->Id;
+ my $text = <<EOF;
+From: root\@localhost
+To: general\@$RT::rtname
+Subject: [$subject_tag #$ticketid] [comment] [remote-rt-system #79] test
+
+reply with subject tag and remote rt subject tag
+EOF
+ my ($status, $id) = RT::Test->send_via_mailgate($text, queue => $queue->Name);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+ is ($id, $ticketid, "Replied to ticket $id correctly");
+
+ my $freshticket = RT::Ticket->new( RT->SystemUser );
+ $freshticket->LoadById($id);
+ like($freshticket->Subject,qr/\[remote-rt-system #79\]/,"Kept remote rt's subject tag");
+ unlike($freshticket->Subject,qr/comment/,"doesn't grab comment");
+ unlike($freshticket->Subject,qr/\[\Q$subject_tag\E #$ticketid\]/,'Stripped Queue Subject Tag correctly');
+}
+
commit af4711aa0f814e91392e72942ce44303f8d4c2e6
Merge: 7e11127 856fad1
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Tue Mar 12 21:15:35 2013 +0400
Merge branch '4.0/non-greedy-extract-subject-tag' into 4.0-trunk
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list