[Rt-devel] PATCH: Link symmetry

Todd Chapman todd at chaka.net
Mon Nov 7 14:13:30 EST 2005


On Mon, Nov 07, 2005 at 01:16:29PM -0500, Jesse Vincent wrote:
> 
[snip]
> 
> Can you throw the new tests into a test script, rather than inline
> testing? I'm trying to get us away from the inline stuff, which has
> turned out to be more trouble than its worth and is harder to run while
> testing individual features.
> 
> > +my $transactions = $ticket2->Transactions;
> > +$transactions->Limit( FIELD => 'Type', VALUE => 'AddLink' );
> > +ok( $transactions->Count == 1, "Transaction found in other ticket" );
> > +ok( $transactions->First->Field eq 'ReferredToBy');
> > +ok( $transactions->First->NewValue eq $ticket->URI );
> > +
> > +($id,$msg) =$ticket->DeleteLink(Type => 'RefersTo', Target => $ticket2->id);
> > +ok($id,$msg);
> > +$transactions = $ticket2->Transactions;
> > +$transactions->Limit( FIELD => 'Type', VALUE => 'DeleteLink' );
> > +ok( $transactions->Count == 1, "Transaction found in other ticket" );
> > +ok( $transactions->First->Field eq 'ReferredToBy');
> > +ok( $transactions->First->OldValue eq $ticket->URI );
> > +
> >  =end testing 
> >  
> >  =cut
[snip]

None of the current test files seem to apply. I'll create a
new one unless you suggest otherwise. Do you want one aimed
specifically at linking, or should I create one that is
aimed at testing all of the RT::Ticket API?

-Todd


More information about the Rt-devel mailing list