[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-177-g524f148

Shawn Moore sartak at bestpractical.com
Mon Jul 19 17:07:06 EDT 2010


The branch, new-style-templates has been updated
       via  524f14856c335e26226b84135dfb6cc967ea41f9 (commit)
      from  683e7442f3f11f33346778ca47274b995e27b32c (commit)

Summary of changes:
 t/api/template-simple.t |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 t/api/template-simple.t

- Log -----------------------------------------------------------------
commit 524f14856c335e26226b84135dfb6cc967ea41f9
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Jul 19 17:08:46 2010 -0400

    Begin adding more API tests for templates

diff --git a/t/api/template-simple.t b/t/api/template-simple.t
new file mode 100644
index 0000000..e0ace96
--- /dev/null
+++ b/t/api/template-simple.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use RT;
+use RT::Test tests => 5;
+
+my $t = RT::Template->new($RT::SystemUser);
+$t->Create(
+    Name => "Foo",
+    Content => "\ntest",
+);
+ok($t->id, "Created template");
+is($t->Name, "Foo");
+is($t->Content, "\ntest");
+
+my ($ok, $msg) = $t->Parse;
+ok($ok, $msg);
+is($t->MIMEObj->stringify_body, "test");
+
+1;
+

-----------------------------------------------------------------------


More information about the Rt-commit mailing list