6 #use Test::More tests => 26;
7 use Test::More qw/no_plan/;
15 my $SUBJECT = "Search test - ".$$;
17 use_ok('RT::Tickets');
18 my $tix = RT::Tickets->new($RT::SystemUser);
19 can_ok($tix, 'FromSQL');
20 $tix->FromSQL('Updated = "2005-08-05" AND Subject = "$SUBJECT"');
22 ok(! $tix->Count, "Searching for tickets updated on a random date finds nothing" . $tix->Count);
24 my $ticket = RT::Ticket->new($RT::SystemUser);
25 $ticket->Create(Queue => 'General', Subject => $SUBJECT);
26 ok ($ticket->id, "We created a ticket");
27 my ($id, $txnid, $txnobj) = $ticket->Comment( Content => 'A comment that happend on 2004-01-01');
29 isa_ok($txnobj, 'RT::Transaction');
31 ok($txnobj->CreatedObj->ISO);
32 my ( $sid,$smsg) = $txnobj->__Set(Field => 'Created', Value => '2005-08-05 20:00:56');
34 is($txnobj->Created,'2005-08-05 20:00:56');
35 is($txnobj->CreatedObj->ISO,'2005-08-05 20:00:56');
37 $tix->FromSQL(qq{Updated = "2005-08-05" AND Subject = "$SUBJECT"});