5 use RT::Test tests => 11;
10 my $q = RT::Queue->new(RT->SystemUser);
11 $q->Create(Name =>'ownerChangeTest');
13 ok($q->Id, "Created a scriptest queue");
15 my $s1 = RT::Scrip->new(RT->SystemUser);
16 my ($val, $msg) =$s1->Create( Queue => $q->Id,
17 ScripAction => 'User Defined',
18 ScripCondition => 'On Owner Change',
19 CustomIsApplicableCode => '',
20 CustomPrepareCode => 'return 1',
22 $self->TicketObj->SetPriority($self->TicketObj->Priority+1);
29 my $ticket = RT::Ticket->new(RT->SystemUser);
30 my ($tv,$ttv,$tm) = $ticket->Create(Queue => $q->Id,
31 Subject => "hair on fire",
32 InitialPriority => '20'
35 ok($ticket->SetOwner('root'));
36 is ($ticket->Priority , '21', "Ticket priority is set right");
38 is ($ticket->Priority , '22', "Ticket priority is set right");
40 is ($ticket->Priority , '23', "Ticket priority is set right");
42 is ($ticket->Priority , '24', "Ticket priority is set right");