[Rt-devel] Possible RT testing bug
Todd Chapman
todd at chaka.net
Wed Mar 9 17:13:21 EST 2005
On Wed, Mar 09, 2005 at 05:07:44PM -0500, Jesse Vincent wrote:
>
>
>
> On Wed, Mar 09, 2005 at 04:29:15PM -0500, Todd Chapman wrote:
> > RT::Ticket::Create returns an array, so when evaluated in
> > a scalar context it is always true. Correct?
> >
> > If so, isn't this testing code from Tickets_Overlay_SQL flawed?
> >
> > ok( $t->Create(Queue => 'General', Subject => $string), "Ticket Created");
>
> Yep. that looks flawed.
>
That type of problem looks to be somewhat common in the RT testing
code. It has bugged me a little why RT doesn't use wantarray
or put error messages in global vaiables, so that it is easier
to call Create and the like in scalar context.
More information about the Rt-devel
mailing list