[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-197-g38fa8e8
Shawn Moore
sartak at bestpractical.com
Thu Jul 22 20:27:18 EDT 2010
The branch, new-style-templates has been updated
via 38fa8e8f53a8ef6f97f536ed115ba286c1c88c3b (commit)
from e907f5e76c27b4658a860b0d1ee88a27a77398a9 (commit)
Summary of changes:
t/api/template-simple.t | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 38fa8e8f53a8ef6f97f536ed115ba286c1c88c3b
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Thu Jul 22 20:28:55 2010 -0400
(Currently) failing test for calling $ticket->Resolve in a simple template
diff --git a/t/api/template-simple.t b/t/api/template-simple.t
index c239610..ecbd6fc 100644
--- a/t/api/template-simple.t
+++ b/t/api/template-simple.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
use RT;
-use RT::Test tests => 99;
+use RT::Test tests => 107;
my $ticket = RT::Ticket->new($RT::SystemUser);
my ($id, $msg) = $ticket->Create(
@@ -61,6 +61,15 @@ TemplateTest(
SimpleOutput => "test { \$Ticket->OwnerObj->Name }",
);
+# should this be forbidden or not?
+is($ticket->Status, 'new', "test setup");
+TemplateTest(
+ Content => "\ntest { \$Ticket->Resolve }",
+ SkipFull => 1,
+ SimpleOutput => "test { \$Ticket->Resolve }",
+);
+is($ticket->Status, 'new', "simple templates can't call ->Resolve");
+
# Make sure changing the template's type works
my $template = RT::Template->new($RT::SystemUser);
$template->Create(
@@ -121,6 +130,8 @@ sub TemplateTest {
my %args = @_;
for my $type ('Full', 'Simple') {
+ next if $args{"Skip$type"};
+
IndividualTemplateTest(
%args,
Type => $type,
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list