[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-59-gb986cfd
? sunnavy
sunnavy at bestpractical.com
Tue May 25 04:30:31 EDT 2010
The branch, 3.8-trunk has been updated
via b986cfda9f5c08270e87785fb1a7c606ffa73a66 (commit)
from efb51ca451d02506fd4a8ce623baa0c52e5934e4 (commit)
Summary of changes:
t/api/tranaction_content.t | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 t/api/tranaction_content.t
- Log -----------------------------------------------------------------
commit b986cfda9f5c08270e87785fb1a7c606ffa73a66
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue May 25 16:30:21 2010 +0800
add tranaction_content.t
diff --git a/t/api/tranaction_content.t b/t/api/tranaction_content.t
new file mode 100644
index 0000000..0f5d78c
--- /dev/null
+++ b/t/api/tranaction_content.t
@@ -0,0 +1,19 @@
+use warnings;
+use strict;
+
+use RT::Test tests => 3;
+use MIME::Entity;
+my $ticket = RT::Ticket->new($RT::SystemUser);
+my $mime = MIME::Entity->build(
+ From => 'test at example.com',
+ Type => 'text/html',
+ Data => ["this is body\n"],
+);
+$mime->attach( Data => ['this is attachment'] );
+my $id = $ticket->Create( MIMEObj => $mime, Queue => 'General' );
+ok( $id, "created ticket $id" );
+my $txns = $ticket->Transactions;
+$txns->Limit( FIELD => 'Type', VALUE => 'Create' );
+my $txn = $txns->First;
+ok( $txn, 'got Create txn' );
+is( $txn->Content, "this is body\n", "txn's content" );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list