4 use RT::Test tests => 3;
6 my $ticket = RT::Ticket->new($RT::SystemUser);
7 my $mime = MIME::Entity->build(
8 From => 'test@example.com',
10 Data => ["this is body\n"],
12 $mime->attach( Data => ['this is attachment'] );
13 my $id = $ticket->Create( MIMEObj => $mime, Queue => 'General' );
14 ok( $id, "created ticket $id" );
15 my $txns = $ticket->Transactions;
16 $txns->Limit( FIELD => 'Type', VALUE => 'Create' );
17 my $txn = $txns->First;
18 ok( $txn, 'got Create txn' );
19 is( $txn->Content, "this is body\n", "txn's content" );