5 use RT::Test tests => undef;
8 use_ok ('RT::Transaction');
11 my $u = RT::User->new(RT->SystemUser);
13 ok ($u->Id, "Found the root user");
14 ok(my $t = RT::Ticket->new(RT->SystemUser));
15 my ($id, $msg) = $t->Create( Queue => 'General',
19 ok($id, "Create new ticket $id");
22 my $txn = RT::Transaction->new(RT->SystemUser);
23 my ($txn_id, $txn_msg) = $txn->Create(
27 NewValue => 'ticket 42', );
28 ok( $txn_id, "Created transaction $txn_id: $txn_msg");
31 warning_like { $brief = $txn->BriefDescription }
32 qr/Could not determine a URI scheme/,
35 is( $brief, 'Reference to ticket 42 added', "Got string description: $brief");
37 $txn = RT::Transaction->new(RT->SystemUser);
38 ($txn_id, $txn_msg) = $txn->Create(
42 OldValue => 'ticket 42', );
43 ok( $txn_id, "Created transaction $txn_id: $txn_msg");
45 warning_like { $brief = $txn->BriefDescription }
46 qr/Could not determine a URI scheme/,
49 is( $brief, 'Reference to ticket 42 deleted', "Got string description: $brief");