diff options
| author | ivan <ivan> | 2011-02-17 00:25:23 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2011-02-17 00:25:23 +0000 |
| commit | fc6209f398899f0211cfcedeb81a3cd65e04a941 (patch) | |
| tree | bc1dc8876218529948413d85c17cd67508bdd38d /rt/t/api/txn_content.t | |
| parent | e70abd21bab68b23488f7ef1ee2e693a3b365691 (diff) | |
import rt 3.8.9
Diffstat (limited to 'rt/t/api/txn_content.t')
| -rw-r--r-- | rt/t/api/txn_content.t | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rt/t/api/txn_content.t b/rt/t/api/txn_content.t new file mode 100644 index 000000000..0f5d78ca9 --- /dev/null +++ b/rt/t/api/txn_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@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" ); |
