[Rt-commit] rt branch, librarize-send-dashboards, updated. rt-3.9.4-540-ge72ab2b
Shawn Moore
sartak at bestpractical.com
Mon Nov 22 16:18:07 EST 2010
The branch, librarize-send-dashboards has been updated
via e72ab2bfc5110d34daf1782d742369700e7c4cae (commit)
from 0cba1ae8a4342c357375eda47a42ead1657bd936 (commit)
Summary of changes:
t/mail/dashboards.t | 67 ---------------------------------------------------
1 files changed, 0 insertions(+), 67 deletions(-)
- Log -----------------------------------------------------------------
commit e72ab2bfc5110d34daf1782d742369700e7c4cae
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon Nov 22 16:17:48 2010 -0500
Remove some code I cribbed mail stuff off of
diff --git a/t/mail/dashboards.t b/t/mail/dashboards.t
index 634f7b0..f6112ea 100644
--- a/t/mail/dashboards.t
+++ b/t/mail/dashboards.t
@@ -62,70 +62,3 @@ RT::Dashboard::Mailer->MailDashboards(
@mails = RT::Test->fetch_caught_mails;
is @mails, 1, "got a dashboard mail";
-__END__
-
-
-my $original_ticket = RT::Ticket->new( RT->SystemUser );
-diag "Create a ticket and make sure it has the subject tag";
-{
- $original_ticket->Create(
- Queue => $queue->id,
- Subject => 'test',
- Requestor => 'root at localhost'
- );
- my @mails = RT::Test->fetch_caught_mails;
- ok @mails, "got some outgoing emails";
-
- my $status = 1;
- foreach my $mail ( @mails ) {
- my $entity = parse_mail( $mail );
- my $subject = $entity->head->get('Subject');
- $subject =~ /\[\Q$subject_tag\E #\d+\]/
- or do { $status = 0; diag "wrong subject: $subject" };
- }
- ok $status, "Correctly added subject tag to ticket";
-}
-
-
-diag "Test that a reply with a Subject Tag doesn't change the subject";
-{
- my $ticketid = $original_ticket->Id;
- my $text = <<EOF;
-From: root\@localhost
-To: general\@$RT::rtname
-Subject: [$subject_tag #$ticketid] test
-
-reply with 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);
- is($original_ticket->Subject,$freshticket->Subject,'Stripped Queue Subject Tag correctly');
-
-}
-
-diag "Test that a reply with another RT's subject tag changes the subject";
-{
- my $ticketid = $original_ticket->Id;
- my $text = <<EOF;
-From: root\@localhost
-To: general\@$RT::rtname
-Subject: [$subject_tag #$ticketid] [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/\[\Q$subject_tag\E #$ticketid\]/,'Stripped Queue Subject Tag correctly');
-
-}
-
-
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list