Skip Menu |

This queue is for tickets about the CatalystX-CRUD CPAN distribution.

Report information
The Basics
Id: 42323
Status: resolved
Priority: 0/
Queue: CatalystX-CRUD

People
Owner: Nobody in particular
Requestors: bobtfish [...] bobtfish.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in tests causes them to fail on Catalyst 5.80
Hiya I had a quick poke in the tests for CatalystX::CRUD, and the test fail with Catalyst 5.80 is the fact the accessors generated by MooseX::Emulate::Class::Accessor::Fast won't automatically store a list ref if you assin multiple values. This apears to have been a bug in your test code, as I don't think you intended to do this, it just happened anyway. Please find attached a diff which fixes the tests behavior, and adds another test for the current issue.
Subject: CatalystX-CRUD.diff
diff -ur ../CatalystX-CRUD-0.37/t/01-file.t ./t/01-file.t --- ../CatalystX-CRUD-0.37/t/01-file.t 2008-08-22 18:36:08.000000000 +0100 +++ ./t/01-file.t 2009-01-12 04:18:30.000000000 +0000 @@ -1,4 +1,4 @@ -use Test::More tests => 35; +use Test::More tests => 36; use strict; use lib qw( lib t/lib ); use_ok('CatalystX::CRUD::Model::File'); @@ -17,6 +17,7 @@ #dump( $response->headers ); is( $response->headers->{status}, '302', "response was redirect" ); +like( $response->headers->{location}, qr|^http://localhost/file/[^/]+/edit$|, 'Location looked sane'); ok( get('/autoload'), "get /autoload" ); diff -ur ../CatalystX-CRUD-0.37/t/lib/MyApp/Controller/File.pm ./t/lib/MyApp/Controller/File.pm --- ../CatalystX-CRUD-0.37/t/lib/MyApp/Controller/File.pm 2008-04-07 19:32:34.000000000 +0100 +++ ./t/lib/MyApp/Controller/File.pm 2009-01-12 04:14:16.000000000 +0000 @@ -24,14 +24,14 @@ my ( $self, $c, @arg ) = @_; - $self->config->{view_on_single_result} = 1; + $self->view_on_single_result(1); my $tmpf = File::Temp->new; my $file = $c->model( $self->model_name ) ->new_object( file => $tmpf->filename ); - if ( my $uri = $self->view_on_single_result( $c, [$file] ) ) { + if ( my $uri = $self->uri_for_view_on_single_result( $c, [$file] ) ) { $c->response->redirect($uri); return; } Only in ./t/lib/MyApp: root
Subject: Re: [rt.cpan.org #42323] Bug in tests causes them to fail on Catalyst 5.80
Date: Mon, 12 Jan 2009 08:45:03 -0600
To: bug-CatalystX-CRUD [...] rt.cpan.org
From: Peter Karman <peter [...] peknet.com>
Tomas Doran via RT wrote on 01/11/2009 10:22 PM: Show quoted text
> Sun Jan 11 23:22:07 2009: Request 42323 was acted upon. > Transaction: Ticket created by BOBTFISH > Queue: CatalystX-CRUD > Subject: Bug in tests causes them to fail on Catalyst 5.80 > Broken in: (no value) > Severity: Important > Owner: Nobody > Requestors: bobtfish@bobtfish.net > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=42323 > > > > Hiya > > I had a quick poke in the tests for CatalystX::CRUD, and the test fail > with Catalyst 5.80 is the fact the accessors generated by > MooseX::Emulate::Class::Accessor::Fast won't automatically store a list > ref if you assin multiple values. > > This apears to have been a bug in your test code, as I don't think you > intended to do this, it just happened anyway.
Tomas, Sorry you spent time on this. Per your email directly to me of 12/27/08, this is already fixed in svn trunk (I replied to that effect 12/30, but I'm sure it simply got lost in all the things you're tracking for 5.80). I will release 0.38 with this fix shortly. -- Peter Karman . peter@peknet.com . http://peknet.com/
Subject: Re: [rt.cpan.org #42323] Bug in tests causes them to fail on Catalyst 5.80
Date: Mon, 12 Jan 2009 14:48:17 +0000
To: bug-CatalystX-CRUD [...] rt.cpan.org
From: Tomas Doran <bobtfish [...] bobtfish.net>
On 12 Jan 2009, at 14:45, peter@peknet.com via RT wrote: Show quoted text
> Sorry you spent time on this. Per your email directly to me of > 12/27/08, > this is already fixed in svn trunk (I replied to that effect 12/30, > but > I'm sure it simply got lost in all the things you're tracking for > 5.80).
No worries, and yes - I totally dropped the response without taking CX::CRUD off my list, and then didn't re-test trunk before diving in. Never mind, the investigation was trivial. Show quoted text
> I will release 0.38 with this fix shortly.
Super, I've already put 0.37 in the list of things which you need to upgrade if you have them installed when you upgrade to 5.80. Many thanks t0m
0.38 uploaded to pause.
0.38 uploaded to pause.
0.38 uploaded to pause.