[Rt-commit] rt branch, 4.2/smime-v2, updated. rt-4.0.4-525-gdc2cdf9
Ruslan Zakirov
ruz at bestpractical.com
Wed Jul 18 11:55:57 EDT 2012
The branch, 4.2/smime-v2 has been updated
via dc2cdf955402d21d4f0a046857074d6c48187767 (commit)
via 29e287ea6f08245ed6e6c6c616f2513f43ab65a0 (commit)
from 1f488505daa0330bd54d634859b412792ea29504 (commit)
Summary of changes:
lib/RT/Template.pm | 2 +-
t/crypt/smime/bad-recipients.t | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 29e287ea6f08245ed6e6c6c616f2513f43ab65a0
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Jul 18 19:45:51 2012 +0400
test that notification to RT owner has correct info
diff --git a/t/crypt/smime/bad-recipients.t b/t/crypt/smime/bad-recipients.t
index ddbc7cc..3e61361 100644
--- a/t/crypt/smime/bad-recipients.t
+++ b/t/crypt/smime/bad-recipients.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test::SMIME tests => 10;
+use RT::Test::SMIME tests => 13;
use RT::Tickets;
@@ -63,4 +63,9 @@ RT::Test->clean_caught_mails;
my @mails = RT::Test->fetch_caught_mails;
is scalar @mails, 3, "autoreply, to bad user, to RT owner";
+
+ like $mails[0], qr{To: baduser\@example\.com}, "notification to bad user";
+ like $mails[1], qr{To: root}, "notification to RT owner";
+ like $mails[1], qr{Recipient 'baduser\@example\.com' is unusable, the reason is 'Key not found'},
+ "notification to owner has error";
}
commit dc2cdf955402d21d4f0a046857074d6c48187767
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Jul 18 18:54:57 2012 +0400
fix passing arrays, hashes and code into templates
It was always intention to make XXX => [...] arguments
to $template->Parse method to be available in template's
code as @XXX, but it was broken.
This is a fix, not a backwards incompatible change, as we
have GnuPG errors notification templates that rely on
such behavior.
diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
index 158547a..f52e035 100644
--- a/lib/RT/Template.pm
+++ b/lib/RT/Template.pm
@@ -433,7 +433,7 @@ sub _ParseContentPerl {
foreach my $key ( keys %{ $args{TemplateArgs} } ) {
my $val = $args{TemplateArgs}{ $key };
next unless ref $val;
- next if ref $val =~ /^(ARRAY|HASH|SCALAR|CODE)$/;
+ next if ref($val) =~ /^(ARRAY|HASH|SCALAR|CODE)$/;
$args{TemplateArgs}{ $key } = \$val;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list